[PATCH v2 0/3] mtd: rawnand: cadence: Fix incorrect variable dereference
From: Miquel Raynal
Date: Tue Nov 24 2026 - 04:24:48 EST
Small series fixing a report dating from September on the Cadence
controller. The last patch uses a newer API for one of the DMA helpers.
Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
---
Changes in v2:
- Add a patch resizing the bounce buffer before the BBT scan, which
fixes a potential heap buffer overflow reported by Sashiko.
- Convert the buffer mapping in cadence_nand_slave_dma_transfer()
to dmaengine_get_dma_device() so both ends of the transfer are mapped
against the same device, again as suggested by Sashiko.
- Link to v1: https://lore.kernel.org/r/20261119-perso-upstreaming-rawnand-fixes-v1-0-0c95641b550c@xxxxxxxxxxx
---
Miquel Raynal (3):
mtd: rawnand: cadence: Fix DMA device dereference when DMA is disabled
mtd: rawnand: cadence: Resize the bounce buffer before the BBT scan
mtd: rawnand: cadence: Switch to dmaengine_get_dma_device()
drivers/mtd/nand/raw/cadence-nand-controller.c | 62 ++++++++++++++------------
1 file changed, 34 insertions(+), 28 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261119-perso-upstreaming-rawnand-fixes-fb73bd596d1c
Best regards,
--
Miquel Raynal <miquel.raynal@xxxxxxxxxxx>