Re: [PATCH] mtd: rawnand: intel: fix OF node reference leak
From: Miquel Raynal
Date: Sun Sep 20 2026 - 09:23:25 EST
On 16/09/2026 at 00:34:07 +08, Guangshuo Li <lgs201920130244@xxxxxxxxx> wrote:
> ebu_nand_probe() gets a reference to the NAND chip node with
> of_get_next_child(). The probe failure paths release the reference with
> of_node_put(), but the successful probe path keeps it for the lifetime
> of the device and ebu_nand_remove() never drops it.
>
> As a result, each bind/unbind cycle leaks a reference to the NAND chip
> device node.
>
> Drop the reference in ebu_nand_remove() after the NAND teardown using
> the flash node stored in the NAND chip.
>
> This issue was found by manual code inspection.
Feels like what you say is not what you do. Please align the code or the
commit log with your real intention.
> Fixes: bfc618fcc3f1 ("mtd: rawnand: intel: Read the chip-select line from the correct OF node")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
Thanks,
Miquèl