Re: General protection fault in iscsi_rx_thread_pre_handler

2015-01-30 Thread Nicholas A. Bellinger
On Fri, 2015-01-23 at 09:30 +0800, Gavin Guo wrote: > Hi Nicholas, > > On Fri, Jan 23, 2015 at 1:35 AM, Nicholas A. Bellinger > wrote: > > On Thu, 2015-01-22 at 23:56 +0800, Gavin Guo wrote: > >> Hi Nicolas, > >> > >> On Thu, Jan 22, 2015 at 5:50 PM, Nicholas A. Bellinger > >> wrote: > >> > Hi G

[PATCH 2/2] ipr: Driver version 2.6.1

2015-01-30 Thread Brian King
Bump driver version. Signed-off-by: Brian King --- drivers/scsi/ipr.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/scsi/ipr.h~ipr_version_2_6_1 drivers/scsi/ipr.h --- scsi-queue/drivers/scsi/ipr.h~ipr_version_2_6_1 2015-01-14 10:28:14.227130049 -0600 +++

[PATCH 1/2] ipr: Reboot speed improvements

2015-01-30 Thread Brian King
Currently when performing a reboot with an ipr adapter, the adapter gets shutdown completely, flushing all write cache, as well as performing a full hardware reset of the card during the shutdown phase of the old kernel. This ensures the adapter is in a fully quiesced state across the reboot. The

Re: [PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-30 Thread Mike Christie
On 01/30/2015 08:34 AM, Bart Van Assche wrote: > On 01/30/15 03:06, Mike Christie wrote: >> I think I figured this out. I think we want to change the >> scsi_prep_state_check check instead of each driver/class. >> >> It looks like for the SDEV_QUIESCE state we want to allow REQ_PREEMPT >> commands.

Re: [PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h

2015-01-30 Thread Andy Grover
On 01/30/2015 09:28 AM, Douglas Gilbert wrote: At the moment many user space programs in Linux access the SG_IO ioctl related declarations with: #include I suspect that file is maintained by the glib folks (because it does not match the kernel file but is logically equivalent). Now if this

RE: block layer copying user io vectors

2015-01-30 Thread Andy Falanga (afalanga)
> > This function does something that seems rather strange. On line 859, > > a for loop determines the number of pages needed for the copying of > > the user data to kernel space. Then the memory is allocated (line > > 886 bio_kmalloc()). Then, strangely, on line 895, there is this > > condition

Re: [PATCHv2 5/5] scsi: move scsi/sg.h to uapi/linux/sg.h

2015-01-30 Thread Douglas Gilbert
On 15-01-29 07:56 PM, Andy Grover wrote: This will enable user programs to have access to the most current definitions. The above description is a bit too generic. At the moment many user space programs in Linux access the SG_IO ioctl related declarations with: #include I suspect that fi

[PATCH] sg: Remove an unused variable

2015-01-30 Thread Bart Van Assche
The 'data_dir' variable is not used in sg_common_write(), hence remove this variable. Signed-off-by: Bart Van Assche Acked-by: Douglas Gilbert --- drivers/scsi/sg.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index

Re: [PATCH] IB/srp: Process REQ_PREEMPT requests correctly

2015-01-30 Thread Bart Van Assche
On 01/30/15 03:06, Mike Christie wrote: > I think I figured this out. I think we want to change the > scsi_prep_state_check check instead of each driver/class. > > It looks like for the SDEV_QUIESCE state we want to allow REQ_PREEMPT > commands. James would know best, but I think SPI needs that ab

Re: usb-storage URB use-after-free

2015-01-30 Thread Joe Lawrence
On Thu, 29 Jan 2015 11:42:18 -0500 Alan Stern wrote: > On Wed, 28 Jan 2015, Joe Lawrence wrote: > > > This one should have gone over to linux-usb. > > > > -- Joe > > > > On 01/28/2015 05:04 PM, Joe Lawrence wrote: > > > Hello linux-usb, > > > > > > We've hit a USB use-after-free on Stratus HW

[patch] [SCSI] mvumi: shift wrapping bug in mvumi_delete_internal_cmd()

2015-01-30 Thread Dan Carpenter
"m_sg->baseaddr_h" is a u32. We shift it 32 bits before casting it to dma_addr_t so the cast is too late. Fixes: f0c568a478f0 ('[SCSI] mvumi: Add Marvell UMI driver') Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 3e6b866..e7f5485 100644 --- a/driver

Re: [PATCH 4/8] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len

2015-01-30 Thread Michael S. Tsirkin
On Fri, Jan 30, 2015 at 08:12:28AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio > iovec ptr + len when determing pages_nr. > > This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow > the sa

Re: [PATCH 1/3] scsi: serialize ->rescan against ->remove

2015-01-30 Thread Paolo Bonzini
On 30/01/2015 02:08, Fam Zheng wrote: > On Fri, 01/30 00:11, Paolo Bonzini wrote: >> >> >> On 29/01/2015 00:00, Christoph Hellwig wrote: >>> Lock the device embedded in the scsi_device to protect against >>> concurrent calls to ->remove. >>> >>> Signed-off-by: Christoph Hellwig >> >> I wonder if

Re: [PATCH 1/8] lib/iovec: Add memcpy_fromiovec_out library function

2015-01-30 Thread Paolo Bonzini
On 30/01/2015 09:12, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch adds a new memcpy_fromiovec_out() library function which modifies > the passed *iov following memcpy_fromiovec(), but also returns the next > current > iovec pointer via **iov_out. > > This is useful f

[patch] bnx2fc: fix test of "err_warn_bit_map"

2015-01-30 Thread Dan Carpenter
The bug in this code is "if (err_warn_bit_map & (u64) (1 << i)) {". The cast to u64 happens after we have already shift wrapped so it's too late. Presumably this means some warnings are ignored. I also cleanup the other err_warn_bit_map check. Signed-off-by: Dan Carpenter --- Not tested. diff

[PATCH 1/8] lib/iovec: Add memcpy_fromiovec_out library function

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a new memcpy_fromiovec_out() library function which modifies the passed *iov following memcpy_fromiovec(), but also returns the next current iovec pointer via **iov_out. This is useful for vhost ANY_LAYOUT support when guests are allowed to generate incom

[PATCH 6/8] vhost/scsi: Add ANY_LAYOUT prerequisites

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds ANY_LAYOUT prerequisites logic for accepting a set of protection + data payloads via iovec + offset. Also includes helpers for calcuating SGLs + invoking vhost_scsi_map_to_sgl() with a known number of iovecs. Required by ANY_LAYOUT processing when struct

[PATCH 5/8] vhost/scsi: Add common vhost_scsi_queue_desc code

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Move logic for typical vhost_scsi_handle_vq() -> tcm_vhost_workqueue -> tcm_vhost_submission_work() dispatch into vhost_scsi_queue_desc(). Can be shared by vhost_scsi_handle_vqal() code. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger ---

[PATCH 3/8] vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON() getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has not been initialized by target_submit_cmd_map_sgls(). It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_n

[PATCH 4/8] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes vhost_scsi_map_to_sgl() parameters to accept virtio iovec ptr + len when determing pages_nr. This is currently done with iov_num_pages() -> PAGE_ALIGN, so allow the same parameters as well. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nic

[PATCH 0/8] vhost/scsi: Add ANY_LAYOUT support

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST & Paolo, The series adds initial vhost/scsi ANY_LAYOUT layout support. It assumes request/CDB and response/sense_buffer headers may span more than a single iovec using lib/iovec.c logic, along with a new addition of memcpy_fromiovec_out() to return the current re

[PATCH 2/8] vhost/scsi: Convert completion path to use memcpy_toiovecend

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Required for ANY_LAYOUT support when the incoming virtio-scsi response header + fixed size sense buffer payload may span more than a single iovec entry. This changes existing code to save cmd->tvc_resp_iod instead of the first single iovec base pointer from &vq->iov[out]

[PATCH 7/8] vhost/scsi: Add ANY_LAYOUT support

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds initial ANY_LAYOUT support with a new vhost_virtqueue callback in vhost_scsi_handle_vqal(). It calculates data_direction + exp_data_len for the new tcm_vhost_cmd descriptor by walking both outgoing + incoming iovecs, assuming the layout of outgoing reques

[PATCH 8/8] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits

2015-01-30 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits required for virtio-scsi 1.0 spec layout requirements. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- drivers/vhost/scsi.c | 9 +++-- 1 file changed, 7 inserti