diff options
author | Justin Maggard <jmaggard10@gmail.com> | 2016-10-04 13:17:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-22 12:26:55 +0200 |
commit | ffb3c7a99a15a7644c2fc632d6474a1e4c0c800c (patch) | |
tree | 6ea4dd0f250a62ba9854e9d9f55fc1c5b3b3f1c9 /crypto | |
parent | be90a09bd915e417feae76d9a72c2a37dc5cf1b7 (diff) | |
download | linux-stable-ffb3c7a99a15a7644c2fc632d6474a1e4c0c800c.tar.gz linux-stable-ffb3c7a99a15a7644c2fc632d6474a1e4c0c800c.tar.bz2 linux-stable-ffb3c7a99a15a7644c2fc632d6474a1e4c0c800c.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/async_tx/async_pq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c index c0748bbd4c08..84f8d4d8b6bc 100644 --- a/crypto/async_tx/async_pq.c +++ b/crypto/async_tx/async_pq.c @@ -368,8 +368,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); @@ -424,9 +422,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); |