mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] lib-scatterlist-fix-memory-leak-with-scsi-mq.patch removed from -mm tree
@ 2014-10-29 18:23 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-29 18:23 UTC (permalink / raw)
  To: tonyb, James.Bottomley, axboe, hch, martin.petersen, stable, mm-commits


The patch titled
     Subject: lib/scatterlist: fix memory leak with scsi-mq
has been removed from the -mm tree.  Its filename was
     lib-scatterlist-fix-memory-leak-with-scsi-mq.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Tony Battersby <tonyb@cybernetics.com>
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@cybernetics.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: <stable@vger.kernel.org>	[3.17.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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;
 	}
 
_

Patches currently in -mm which might be from tonyb@cybernetics.com are

linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-29 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-29 18:23 [merged] lib-scatterlist-fix-memory-leak-with-scsi-mq.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).