Re: + lib-scatterlist-fix-memory-leak-with-scsi-mq.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/2014 04:47 PM, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> 
> The patch titled
>      Subject: lib/scatterlist: fix memory leak with scsi-mq
> has been added to the -mm tree.  Its filename is
>      lib-scatterlist-fix-memory-leak-with-scsi-mq.patch
> 
> This patch should soon appear at
>     http://ozlabs.org/~akpm/mmots/broken-out/lib-scatterlist-fix-memory-leak-with-scsi-mq.patch
> and later at
>     http://ozlabs.org/~akpm/mmotm/broken-out/lib-scatterlist-fix-memory-leak-with-scsi-mq.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
> 
> ------------------------------------------------------
> From: Tony Battersby <tonyb@xxxxxxxxxxxxxxx>
> Subject: lib/scatterlist: fix memory leak with scsi-mq
> 
> Fix a memory leak with scsi-mq triggered by commands with large data
> transfer length.
> 
> Fixes: c53c6d6a68b1 ("scatterlist: allow chaining to preallocated chunks")
> Signed-off-by: Tony Battersby <tonyb@xxxxxxxxxxxxxxx>
> Cc: Jens Axboe <axboe@xxxxxxxxx>
> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
> Acked-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>	[3.17.x]
> 
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> ---
> 
>  lib/scatterlist.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff -puN lib/scatterlist.c~lib-scatterlist-fix-memory-leak-with-scsi-mq lib/scatterlist.c
> --- a/lib/scatterlist.c~lib-scatterlist-fix-memory-leak-with-scsi-mq
> +++ a/lib/scatterlist.c
> @@ -203,10 +203,10 @@ void __sg_free_table(struct sg_table *ta
>  		}
>  
>  		table->orig_nents -= sg_size;
> -		if (!skip_first_chunk) {
> -			free_fn(sgl, alloc_size);
> +		if (skip_first_chunk)
>  			skip_first_chunk = false;
> -		}
> +		else
> +			free_fn(sgl, alloc_size);
>  		sgl = next;
>  	}
>  
> _

I already queued this one up in for-linus.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]