Skip to content

Commit

Permalink
async_pq_val: fix DMA memory leak
Browse files Browse the repository at this point in the history
Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.

Fixes: 1786b94 ("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>
  • Loading branch information
Justin Maggard authored and Vinod Koul committed Oct 5, 2016
1 parent 96622bd commit c847509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/async_tx/async_pq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c847509

Please sign in to comment.