[PATCH] mtd: virt_concat: Fix device_node reference leaks in mtd_virt_concat_create_item()

Miquel Raynal miquel.raynal at bootlin.com
Tue Nov 17 05:37:14 PST 2026


On Tue, 27 Oct 2026 16:13:45 +0530, Vishal Satle wrote:
> In mtd_virt_concat_create_item(), several device_node reference count leaks
> and lifecycle bugs exist:
> 
> 1. of_parse_phandle() returns a device_node with its refcount incremented.
>    The validation loop calls mtd_is_part_concat() directly on the returned
>    pointer without releasing it, leaking the node reference on every
>    iteration and on early return.
> 
> [...]

Applied to mtd/next, thanks!

[1/1] mtd: virt_concat: Fix device_node reference leaks in mtd_virt_concat_create_item()
      commit: d2a681eed8154900ed66c4f77b32d860b71d44cc

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




More information about the linux-mtd mailing list