summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard10@gmail.com>2016-10-04 13:17:58 -0700
committerBen Hutchings <ben@decadent.org.uk>2017-02-23 03:54:09 +0000
commitc3fa800fe93510717471914ecc499269c89746f8 (patch)
tree0c8da7751ec13734c1ea306803b410ffae9c3c1a /crypto
parent315d5cc06a0d6b4eb1900e94e3bee45c42124d3c (diff)
downloadlinux-stable-c3fa800fe93510717471914ecc499269c89746f8.tar.gz
linux-stable-c3fa800fe93510717471914ecc499269c89746f8.tar.bz2
linux-stable-c3fa800fe93510717471914ecc499269c89746f8.zip
async_pq_val: fix DMA memory leak
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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/async_tx/async_pq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c
index 7eb264e65267..1ce03d38c817 100644
--- a/crypto/async_tx/async_pq.c
+++ b/crypto/async_tx/async_pq.c
@@ -355,8 +355,6 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
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, unsigned int offset, int disks,
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);