Re: module: fix module_refcount() return when running in a module exit routine

2015-01-23 Thread Rusty Russell
James Bottomley writes: > On Fri, 2015-01-23 at 05:17 -0800, Christoph Hellwig wrote: >> On Fri, Jan 23, 2015 at 01:24:15PM +1030, Rusty Russell wrote: >> > The correct fix is to turn try_module_get() into __module_get(), and >> > always do the module_put().

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-22 Thread Rusty Russell
ld code, we expected try_module_get() to fail but then used > module_refcount() to detect the failure and not do a put. Yep, I've put that patch in my fixes queue now. Thanks, Rusty. From: Rusty Russell Subject: scsi: always increment reference count James reported: > After e513cc1 module: Remov

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-21 Thread Rusty Russell
James Bottomley writes: > Actually, I don't think this is enough. Some Australian once came up > with a guide to APIs, and lectured on it at length, one of which was > that the name should be the obvious use and it is unexpected that a > refcount would go negative. I think we could raise it from

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-19 Thread Rusty Russell
James Bottomley writes: > On Mon, 2015-01-19 at 16:21 +1030, Rusty Russell wrote: >> Masami Hiramatsu writes: >> > (2015/01/19 1:55), James Bottomley wrote: >> >> From: James Bottomley >> >> >> >> After e513cc1 module: Remove stop_mac

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-18 Thread Rusty Russell
Masami Hiramatsu writes: > (2015/01/19 1:55), James Bottomley wrote: >> From: James Bottomley >> >> After e513cc1 module: Remove stop_machine from module unloading, >> module_refcount() is returning (unsigned long)-1 when called from within >> a routine that runs in module_exit. This is confusi

Re: module: fix module_refcount() return when running in a module exit routine

2015-01-18 Thread Rusty Russell
James Bottomley writes: > From: James Bottomley > > After e513cc1 module: Remove stop_machine from module unloading, > module_refcount() is returning (unsigned long)-1 when called from within > a routine that runs in module_exit. This is confusing the scsi device > put code which is coded to det

Re: [PATCH v4 04/25] virtio: defer config changed notifications

2014-10-13 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Defer config changed notifications that arrive during > probe/scan/freeze/restore. > > This will allow drivers to set DRIVER_OK earlier, without worrying about > racing with config change interrupts. > > This change will also benefit old hypervisors (before 2009) > t

Re: [PATCH v3 10/25] virtio: add API to enable VQs early

2014-10-12 Thread Rusty Russell
"Michael S. Tsirkin" writes: > virtio spec 0.9.X requires DRIVER_OK to be set before > VQs are used, but some drivers use VQs before probe > function returns. > Since DRIVER_OK is set after probe, this violates the spec. > > Even though under virtio 1.0 transitional devices support this > behaviou

Re: [PATCH 5/6] scsi: use 64-bit value for 'max_luns'

2014-07-08 Thread Rusty Russell
> index b00142e..2b2a9dd 100644 >> --- a/kernel/params.c >> +++ b/kernel/params.c >> @@ -253,6 +253,7 @@ STANDARD_PARAM_DEF(int, int, "%i", kstrtoint); >> STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint); >> STANDARD_PARAM_DEF(long, long

Re: [PATCH-v2 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-05-22 Thread Rusty Russell
used for >> signaling when protection information buffers are expected to >> preceed the data buffers. > > Cc rusty. > Rusty could you please Ack merging this through Nicholas' tree > together with the vhost changes? Acked-by: Rusty Russell Thanks, Rusty. -- To unsubsc

[PATCH] virtio_scsi: don't call virtqueue_add_sgs(... GFP_NOIO) holding spinlock.

2014-05-19 Thread Rusty Russell
mp;virtscsi_vq->vq_lock)->rlock){..}, at: [] virtscsi_kick_cmd+0x18/0x1b0 CPU: 0 PID: 6 Comm: kworker/u2:0 Not tainted 3.15.0-rc5+ #110 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-rc1-0-gb1d4dc9-20140515_140003-nilsson.home.kraxel.org 04/01/2014 Workqueue: scsi

Re: [PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2014-01-14 Thread Rusty Russell
Jason Wang writes: > From: Asias He > > vqs are freed in virtscsi_freeze but the hotcpu_notifier is not > unregistered. We will have a use-after-free usage when the notifier > callback is called after virtscsi_freeze. > > Fixes: 285e71ea6f3583a85e27cb2b9a7d8c35d4c0d558 > ("virtio-scsi: reset virt

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-12-16 Thread Rusty Russell
Jason Wang writes: > On 10/28/2013 04:01 PM, Asias He wrote: >> vqs are freed in virtscsi_freeze but the hotcpu_notifier is not >> unregistered. We will have a use-after-free usage when the notifier >> callback is called after virtscsi_freeze. >> >> Signed-off-by: Asias He Please include a Fixes

Re: [PATCH] virtio-scsi: Fix virtqueue affinity setup

2013-07-31 Thread Rusty Russell
Asias He writes: > vscsi->num_queues counts the number of request virtqueue which does not > include the control and event virtqueue. It is wrong to subtract > VIRTIO_SCSI_VQ_BASE from vscsi->num_queues. > > This patch fixes the following panic. Applied. Thanks, Rusty. > > (qemu) device_del scs

Re: [PATCH V7 0/5] virtio-scsi multiqueue

2013-04-08 Thread Rusty Russell
Asias He writes: > On Sat, Apr 06, 2013 at 09:40:13AM +0100, James Bottomley wrote: >> Well, I haven't had time to look at anything other than the patch I >> commented on. I'm happy with your fix, so you can add my acked by to >> that one. Since it's going through the virtio tree, don't wait for

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Rusty Russell
Wanlong Gao writes: > Add hot cpu notifier to reset the request virtqueue affinity > when doing cpu hotplug. You need to be careful to get_online_cpus() and put_online_cpus() here, so CPUs can't go up and down in the middle of operations. In particular, get_online_cpus()/put_online_cpus() around

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-07 Thread Rusty Russell
Paolo Bonzini writes: > Il 07/01/2013 01:02, Rusty Russell ha scritto: >> Paolo Bonzini writes: >>> Il 02/01/2013 06:03, Rusty Russell ha scritto: >>>> Paolo Bonzini writes: >>>>> The virtqueue_add_buf function has two limitations: >>>

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Paolo Bonzini writes: > Il 02/01/2013 06:03, Rusty Russell ha scritto: >> Paolo Bonzini writes: >>> The virtqueue_add_buf function has two limitations: >>> >>> 1) it requires the caller to provide all the buffers in a single call; >>> >>> 2)

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-06 Thread Rusty Russell
Wanlong Gao writes: > On 01/02/2013 01:03 PM, Rusty Russell wrote: >> Paolo Bonzini writes: >>> The virtqueue_add_buf function has two limitations: >>> >>> 1) it requires the caller to provide all the buffers in a single call; >>> >>> 2) it d

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-01 Thread Rusty Russell
plementation by having another interface is pretty nasty; I think I'd prefer the chained scatterlists, if that's optimal for you. Cheers, Rusty. From: Rusty Russell Subject: virtio: use chained scatterlists. Rather than handing a scatterlist[] and out and in numbers to virtqueue_add_b

Re: [PATCH 1/5] virtio-ring: move queue_index to vring_virtqueue

2012-09-05 Thread Rusty Russell
at later if we want (probably by merging the two structures, I'll have to think harder on that). Acked-by: Rusty Russell Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/5] virtio: introduce an API to set affinity for a virtqueue

2012-09-05 Thread Rusty Russell
e force the affinity hint > - if the virtqueues share MSI, make the affinity OR over all affinities > requested > > Signed-off-by: Jason Wang > Signed-off-by: Paolo Bonzini Applied, thanks. Acked-by: Rusty Russell Cheers, Rusty. -- To unsubscribe from this list: send the line "un

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-29 Thread Rusty Russell
On Fri, 27 Jul 2012 10:11:26 +0200, Paolo Bonzini wrote: > Il 27/07/2012 08:27, Rusty Russell ha scritto: > >> > +int virtqueue_add_buf_sg(struct virtqueue *_vq, > >> > + struct scatterlist *sg_out, > >> > +

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-27 Thread Rusty Russell
terlist stuff is complete crack, but I lost that debate years ago.) Here's my variant. Networking, console and block seem OK, at least (ie. it booted!). From: Rusty Russell Subject: virtio: use chained scatterlists. Rather than handing a scatterlist[] and out and in numbers to virtqueue_

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-09 Thread Rusty Russell
On Thursday 10 January 2008 09:10:37 James Bottomley wrote: > On Tue, 2008-01-08 at 11:39 +1100, Rusty Russell wrote: > > On Tuesday 08 January 2008 02:48:23 James Bottomley wrote: > > > We're always open to new APIs (or more powerful and expanded old ones). > > &

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-07 Thread Rusty Russell
On Tuesday 08 January 2008 02:48:23 James Bottomley wrote: > We're always open to new APIs (or more powerful and expanded old ones). > The way we've been doing the sg_chain conversion is to slide API layers > into the drivers so sg_chain becomes a simple API flip when we turn it > on. Unfortunatel

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-07 Thread Rusty Russell
On Monday 07 January 2008 17:37:41 Tejun Heo wrote: > Rusty Russell wrote: > > Hi Tejun, > > > >Nice try! Even ignoring the ugliness of undoing such an operation if > > the caller doesn't expect you to mangle their chains, consider a > > one-element sg ar

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-06 Thread Rusty Russell
On Monday 07 January 2008 16:01:40 Tejun Heo wrote: > > But we hit the same problems: > > > > 1) sg_chain loses information. The clever chain packaging makes reading > > easy, but manipulation is severely limited. You can append to your own > > chains by padding, but not someone elses. This work

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-06 Thread Rusty Russell
On Sunday 06 January 2008 02:31:12 James Bottomley wrote: > On Wed, 2007-12-19 at 17:31 +1100, Rusty Russell wrote: > > This patch series is the start of my attempt to simplify and make > > explicit the chained scatterlist logic. > > > > It's not complete: my SAT

[PATCH] Don't blatt first element of prv in sg_chain()

2008-01-06 Thread Rusty Russell
I realize that sg chaining is a ploy to make the rest of the kernel devs feel the pain of the SCSI subsystem. But this was a little unsubtle. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r b3aec596b841 include/linux/scatterlist.h --- a/include/linux/scatterlist.h Mon Jan

Re: [PATCH 1/3] scsi: Convert everyone to scsi_sglist and scsi_sg_count

2008-01-03 Thread Rusty Russell
On Thursday 03 January 2008 20:26:13 Boaz Harrosh wrote: > On Thu, Jan 03 2008 at 10:50 +0200, Rusty Russell <[EMAIL PROTECTED]> wrote: > > This patch simply converts direct uses of ->use_sg and ->request_buffer > > to use the wrapper macros. This removes the assumpt

[PATCH 3/3] scsi: convert core to sg_ring

2008-01-03 Thread Rusty Russell
fig option (CONFIG_SCSI_SG_CHAIN). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/scsi/Kconfig|6 + drivers/scsi/scsi_error.c | 15 +-- drivers/scsi/scsi_lib.c | 219 +--- drivers/scsi/scsi_lib_dma.c | 27 ++--- drivers/scsi/scsi_

[PATCH 2/3] usb_storage: usb_stor_bulk_transfer_sg cleanup

2008-01-03 Thread Rusty Russell
usb_stor_bulk_transfer_sg() assumes buf is a scatterlist array if use_sg is non-NULL. Change it to an explicit sg arg, instead, to allow the callers to change to scsi_sglist(). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r 09247461cfda drivers/usb/storage/freecom.c --- a/drive

[PATCH 1/3] scsi: Convert everyone to scsi_sglist and scsi_sg_count

2008-01-03 Thread Rusty Russell
g.c's paranoid checking, so that code had to be shuffled a little. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/scsi/NCR5380.c |6 +++--- drivers/scsi/NCR53C9x.c |6 +++--- drivers/scsi/aha1542.c | 14 +++--- drivers/scsi/atari_NCR5380.

[PATCH 0/2] sg_ring: Gentler scsi merge

2008-01-02 Thread Rusty Russell
OK, after wading through many scsi drivers, I decided to change tack and try to provide a transition path. This is in two stages: 1) These two patches. sg_ring used underneath, but if any driver asks for scsi_sglist() they get a 2.6.24-style chained sg. No other patches are necessary. 2) On

Re: [PATCH 0/5] sg_ring for scsi

2007-12-27 Thread Rusty Russell
On Thursday 27 December 2007 13:09:27 FUJITA Tomonori wrote: > On Wed, 26 Dec 2007 11:27:40 +1100 > > Rusty Russell <[EMAIL PROTECTED]> wrote: > > There are many signs through the code that it needs a great deal of > > work: what is the purpose of sg_break?

Re: [PATCH 7/7] sg_ring: convert core ATA code to sg_ring.

2007-12-26 Thread Rusty Russell
On Wednesday 26 December 2007 19:36:36 Tejun Heo wrote: > It would be better to build upon sg chaining as we already have it. I > think it can be made much easier with a bit more safe guards, > generalization and some helpers. Hi Tejun, I did this work to replace sg chaining. The current ch

Re: [PATCH 0/5] sg_ring for scsi

2007-12-25 Thread Rusty Russell
ew sg_ring entry; you need a separate counter if you really want a simple increment. Various flaws in the driver have been maintained. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r 63176a8a6ce3 drivers/scsi/ips.c --- a/drivers/scsi/ips.cMon Dec 24 17:40:08 2007 +1100 +++ b

Re: [PATCH 0/5] sg_ring for scsi

2007-12-20 Thread Rusty Russell
On Friday 21 December 2007 13:28:34 FUJITA Tomonori wrote: > I'm not sure about chaining the headers (as your sg_ring and > scsi_sgtable do) would simplify LLDs. Have you looked at ips or > qla1280? Not yet, am working my way through the drivers, but I don't expect it will be a simplification to

Re: [PATCH 2/5] dma_map_sg_ring() helper

2007-12-20 Thread Rusty Russell
On Friday 21 December 2007 11:40:00 David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Fri, 21 Dec 2007 11:35:12 +1100 > > > On Friday 21 December 2007 11:00:27 FUJITA Tomonori wrote: > > > We need to pass the whole sg entries to the IOMMU

Re: [PATCH 2/5] dma_map_sg_ring() helper

2007-12-20 Thread Rusty Russell
On Friday 21 December 2007 11:00:27 FUJITA Tomonori wrote: > We need to pass the whole sg entries to the IOMMUs at a time. Hi Fujita, OK, it's certainly possible to have an arch override. For which architecture is this BTW? Thanks, Rusty. - To unsubscribe from this list: send the line "u

Re: [PATCH 0/5] sg_ring for scsi

2007-12-20 Thread Rusty Russell
On Thursday 20 December 2007 18:58:07 David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Thu, 20 Dec 2007 18:53:48 +1100 > > > Manipulating the magic chains is horrible; it looks simple to the > > places which simply want to iterate through it, but it

Re: [PATCH 2/5] dma_map_sg_ring() helper

2007-12-20 Thread Rusty Russell
On Thursday 20 December 2007 18:42:44 David Miller wrote: > From: FUJITA Tomonori <[EMAIL PROTECTED]> > Date: Thu, 20 Dec 2007 16:06:31 +0900 > > > On Thu, 20 Dec 2007 16:49:30 +1100 > > > > Rusty Russell <[EMAIL PROTECTED]> wrote: > > > +/** &

Re: [PATCH 0/5] sg_ring for scsi

2007-12-19 Thread Rusty Russell
On Thursday 20 December 2007 18:07:41 FUJITA Tomonori wrote: > On Thu, 20 Dec 2007 16:45:18 +1100 > > Rusty Russell <[EMAIL PROTECTED]> wrote: > > OK, some fixes since last time, as I wade through more SCSI drivers. > > Some drivers use "use_sg" as a flag

Strange code in initio.c?

2007-12-19 Thread Rusty Russell
Hi Alan, Was looking through initio.c to convert it to sg_ring, and noticed this code: initio_build_scb() around 2616: sg = &cblk->sglist[0]; scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { sg->data = cpu_to_le32((u32)sg_dma_addres

[PATCH 5/5] sg_ring: Convert scsi_debug

2007-12-19 Thread Rusty Russell
levent if ->sg isn't set) 3) sg_ring_for_each is no longer required, just iterate directly over ->sg. 4) The iterator updates a struct sg_ring (sg) and an index (k), so previous references to sg become &sg->sg[k] (the k'th element within the sg_ring sg). Signed-off-by: Rusty

[PATCH 4/5] sg_ring: Convert core scsi code to sg_ring.

2007-12-19 Thread Rusty Russell
d->sg, and scsi_bufflen should just be cmd->request_bufflen if you need it. If nothing else, the simplification of this logic shows why I prefer sg_ring over scatterlist chaining. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi

[PATCH 3/5] blk_rq_map_sg_ring as a counterpart to blk_rq_map_sg.

2007-12-19 Thread Rusty Russell
Obvious counterpart to blk_rq_map_sg. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -31,6 +31,7 @@ #include #include #include +#include /* * for max sense size @@ -1364,6 +1

[PATCH 2/5] dma_map_sg_ring() helper

2007-12-19 Thread Rusty Russell
Obvious counterpart to dma_map_sg. Note that this is arch-independent code; sg_rings are backwards compatible with simple sg arrays. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/base/dma-mapping.c | 13 + include/linux/dma-mapping.h |4 2 files c

[PATCH 1/5] sg_ring: sg_ring.h

2007-12-19 Thread Rusty Russell
ist' because it is easy to break down the ring into its constituent arrays. The sg_ring header also encodes the maximum number of entries, useful for routines which populate an sg. We need never hand around a number of elements any more. Signed-off-by: Rusty Russell <[EMAIL PROTECT

[PATCH 0/5] sg_ring for scsi

2007-12-19 Thread Rusty Russell
OK, some fixes since last time, as I wade through more SCSI drivers. Some drivers use "use_sg" as a flag to know whether the request_buffer is a scatterlist: I don't need the counter, but I still need the flag, so I fixed that in a more intuitive way (an explicit ->sg pointer in the cmd). Also

[PATCH 7/7] sg_ring: convert core ATA code to sg_ring.

2007-12-18 Thread Rusty Russell
simply append an sg_ring entry with the padding, and normal iterators can be used. I renamed qc->cursg to qc->cur_sg to catch all the users: they should now be referring to 'qc->cur_sg[qc->cursg_i]' wherever they were using 'qc->cursg'. Signed-off-by: Rusty R

[PATCH 6/7] sg_ring: libata simplification

2007-12-18 Thread Rusty Russell
flag, and buf_virt pointer, and always initialize qc->nbytes in ata_sg_init(). It's possible that the ATA_QCFLAG_SG and ATA_QCFLAG_DMAMAP flags could be entirely removed, and we could use whether qc->__sg is NULL or not. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff

[PATCH 5/7] sg_ring: Convert core scsi code to sg_ring.

2007-12-18 Thread Rusty Russell
If nothing else, the simplification of this logic shows why I prefer sg_ring over scatterlist chaining. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_

[PATCH 4/7] sg_ring: dma_map_sg_ring() helper

2007-12-18 Thread Rusty Russell
Obvious counterpart to dma_map_sg. Note that this is arch-independent code; sg_rings are backwards compatible with simple sg arrays. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/base/dma-mapping.c | 13 + include/linux/dma-mapping.h |4 2 files c

[PATCH 3/7] sg_ring: blk_rq_map_sg_ring as a counterpart to blk_rq_map_sg.

2007-12-18 Thread Rusty Russell
blk_rq_map_sg_ring as a counterpart to blk_rq_map_sg. Obvious counterpart to blk_rq_map_sg. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- block/ll_rw_blk.c | 55 include/linux/blkdev.h |1 + 2 files changed, 56 insertions

[PATCH 2/7] sg_ring: use in virtio.

2007-12-18 Thread Rusty Russell
pass a scatterlist array and two numbers indicating the number of readable and writable elements respectively; now we can simply hand two sg_rings which is much clearer (each sg_ring contains its own length). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/block/virtio_blk.

[PATCH 1/7] sg_ring: introduce sg_ring: a ring of scatterlist arrays.

2007-12-18 Thread Rusty Russell
um number of entries, useful for routines which populate an sg. We need never hand around a number of elements any more. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/sg_ring.h | 74 1 files changed, 74 insertions(+), 0

[PATCH 0/7] sg_ring: a ring of scatterlist arrays

2007-12-18 Thread Rusty Russell
This patch series is the start of my attempt to simplify and make explicit the chained scatterlist logic. It's not complete: my SATA box boots and seems happy, but all the other users of SCSI need to be updated and checked. But I've gotten far enough to believe it's worth persuing. Cheers, Rusty

[PATCH]scsi: BUG_ON() impossible condition.

2007-11-18 Thread Rusty Russell
If blk_rq_map_sg wrote more than was allocated in the scatterlist, BUG_ON() is probably the right thing to do. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Acked-by: Jens Axboe <[EMAIL PROTECTED]> --- drivers/scsi/scsi_tgt_lib.c | 11 +++ 1 files changed, 3 inse