[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1487198500.746791034@decadent.org.uk>
Date: Wed, 15 Feb 2017 22:41:40 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Justin Maggard" <jmaggard@...gear.com>,
"Justin Maggard" <jmaggard10@...il.com>,
"Vinod Koul" <vinod.koul@...el.com>,
"Dan Williams" <dan.j.williams@...el.com>
Subject: [PATCH 3.16 097/306] async_pq_val: fix DMA memory leak
3.16.40-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Justin Maggard <jmaggard10@...il.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@...gear.com>
Reviewed-by: Dan Williams <dan.j.williams@...el.com>
Signed-off-by: Vinod Koul <vinod.koul@...el.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
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
@@ -355,8 +355,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);
@@ -411,9 +409,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);
Powered by blists - more mailing lists