Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1505621 > unrolled thread

[PATCH 4.7 28/45] async_pq_val: fix DMA memory leak

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-10-21 11:20 +0200
Last post2016-10-21 11:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.7 28/45] async_pq_val: fix DMA memory leak Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-21 11:20 +0200

#1505621 — [PATCH 4.7 28/45] async_pq_val: fix DMA memory leak

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-10-21 11:20 +0200
Subject[PATCH 4.7 28/45] async_pq_val: fix DMA memory leak
Message-ID<suE9B-3xe-47@gated-at.bofh.it>
4.7-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Justin Maggard <jmaggard10@gmail.com>

commit c84750906b4818d4929fbf73a4ae6c113b94f52b upstream.

Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.

Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/async_tx/async_pq.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/crypto/async_tx/async_pq.c
+++ b/crypto/async_tx/async_pq.c
@@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks,
 
 		dma_set_unmap(tx, unmap);
 		async_tx_submit(chan, tx, submit);
-
-		return tx;
 	} else {
 		struct page *p_src = P(blocks, disks);
 		struct page *q_src = Q(blocks, disks);
@@ -424,9 +422,11 @@ async_syndrome_val(struct page **blocks,
 		submit->cb_param = cb_param_orig;
 		submit->flags = flags_orig;
 		async_tx_sync_epilog(submit);
-
-		return NULL;
+		tx = NULL;
 	}
+	dmaengine_unmap_put(unmap);
+
+	return tx;
 }
 EXPORT_SYMBOL_GPL(async_syndrome_val);
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web