[PATCH] scsi: fix memory leak with scsi-mq

2015-07-16 Thread Tony Battersby
Fix a memory leak with scsi-mq triggered by commands with large data transfer length. __sg_alloc_table() sets both table->nents and table->orig_nents to the same value. When the scatterlist is DMA-mapped, table->nents is overwritten with the (possibly smaller) size of the DMA-mapped scatterlist,

Re: [PATCH] scsi: fix memory leak with scsi-mq

2015-07-27 Thread Ewan Milne
On Thu, 2015-07-16 at 11:40 -0400, Tony Battersby wrote: > Fix a memory leak with scsi-mq triggered by commands with large data > transfer length. > > __sg_alloc_table() sets both table->nents and table->orig_nents to the > same value. When the scatterlist is DMA-mapped, table->nents is > overwri

Re: [PATCH] scsi: fix memory leak with scsi-mq

2015-07-21 Thread Christoph Hellwig
Thanks Tony, this looks good to me. In the long run I'll see how we can hide these implementation details in the lib/scatterlist.c code instead of burdening it on the users. Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of