diff options
author | Justin Maggard <jmaggard10@gmail.com> | 2016-10-04 16:17:58 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-10-04 20:48:09 -0400 |
commit | c84750906b4818d4929fbf73a4ae6c113b94f52b (patch) | |
tree | bd4dc345a73fc9e3685218c12225d72176e1e14b /crypto/async_tx | |
parent | 96622bde4c3fc0b442d25646f70043a884d54285 (diff) |
async_pq_val: fix DMA memory leak
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'crypto/async_tx')
-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 08b3ac68952b..f83de99d7d71 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, | |||
368 | 368 | ||
369 | dma_set_unmap(tx, unmap); | 369 | dma_set_unmap(tx, unmap); |
370 | async_tx_submit(chan, tx, submit); | 370 | async_tx_submit(chan, tx, submit); |
371 | |||
372 | return tx; | ||
373 | } else { | 371 | } else { |
374 | struct page *p_src = P(blocks, disks); | 372 | struct page *p_src = P(blocks, disks); |
375 | struct page *q_src = Q(blocks, disks); | 373 | struct page *q_src = Q(blocks, disks); |
@@ -424,9 +422,11 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks, | |||
424 | submit->cb_param = cb_param_orig; | 422 | submit->cb_param = cb_param_orig; |
425 | submit->flags = flags_orig; | 423 | submit->flags = flags_orig; |
426 | async_tx_sync_epilog(submit); | 424 | async_tx_sync_epilog(submit); |
427 | 425 | tx = NULL; | |
428 | return NULL; | ||
429 | } | 426 | } |
427 | dmaengine_unmap_put(unmap); | ||
428 | |||
429 | return tx; | ||
430 | } | 430 | } |
431 | EXPORT_SYMBOL_GPL(async_syndrome_val); | 431 | EXPORT_SYMBOL_GPL(async_syndrome_val); |
432 | 432 | ||