mtd: nand: qpic_common: fix BAM transaction memory leak
Subsystems (2)
PATCH 1/1 mtd: nand: qpic_common: fix BAM transaction memory leak
qcom_nandc_alloc() allocates the BAM transaction, but qcom_nandc_unalloc() does not free it. This leaks the transaction on controller removal and probe failures after successful allocation.
Release it in qcom_nandc_unalloc().
--- drivers/mtd/nand/qpic_common.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/nand/qpic_common.c +2 -0
@@ -657,6 +657,8 @@ void qcom_nandc_unalloc(struct qcom_nand_controller *nandc)if (nandc->cmd_chan)dma_release_channel (nandc->cmd_chan); + +qcom_free_bam_transaction (nandc); }else {if (nandc->chan)dma_release_channel (nandc->chan);
---
base-commit: 793807ca13bf3072fc6d16ce6d90e9ab9beff2a5
change-id: 20261115-nandc_unalloc-85129684cbad
Best regards,
Signature · 1 line
Felix Gu <[email protected]>
Quoted 8 lines · Felix Gu
qcom_nandc_alloc()allocates the BAM transaction, butqcom_nandc_unalloc()does not free it. This leaks the transaction on controller removal and probe failures after successful allocation.Release it in
qcom_nandc_unalloc().[...]
Applied to nand/next, thanks!
[1/1] mtd: nand: qpic_common: fix BAM transaction memory leak
commit: a53bc9468f7c4461d51c66cbe949d0fbca37f7f6
Patche(s) should be available on mtd/linux.git and will be part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl