mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
async_pq_val: fix DMA memory leak
commitc84750906bupstream. Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync. Fixes:1786b943da("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
be90a09bd9
commit
ffb3c7a99a
@@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
|
|||||||
|
|
||||||
dma_set_unmap(tx, unmap);
|
dma_set_unmap(tx, unmap);
|
||||||
async_tx_submit(chan, tx, submit);
|
async_tx_submit(chan, tx, submit);
|
||||||
|
|
||||||
return tx;
|
|
||||||
} else {
|
} else {
|
||||||
struct page *p_src = P(blocks, disks);
|
struct page *p_src = P(blocks, disks);
|
||||||
struct page *q_src = Q(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->cb_param = cb_param_orig;
|
||||||
submit->flags = flags_orig;
|
submit->flags = flags_orig;
|
||||||
async_tx_sync_epilog(submit);
|
async_tx_sync_epilog(submit);
|
||||||
|
tx = NULL;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
dmaengine_unmap_put(unmap);
|
||||||
|
|
||||||
|
return tx;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(async_syndrome_val);
|
EXPORT_SYMBOL_GPL(async_syndrome_val);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user