On 10/28/2014 04:47 PM, [email protected] 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 <[email protected]>
> 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 <[email protected]>
> Cc: Jens Axboe <[email protected]>
> Cc: James Bottomley <[email protected]>
> Acked-by: Christoph Hellwig <[email protected]>
> Reviewed-by: Martin K. Petersen <[email protected]>
> Cc: <[email protected]>  [3.17.x]
> 
> Signed-off-by: Andrew Morton <[email protected]>
> ---
> 
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to