[PATCH v2 20/58] mtd: rawnand: socrates: retain open-handle state on removal

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 10 00:20:43 PST 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mtd: rawnand: socrates: missing Fixes trailer for
  socrates_nand_remove() UAF
--

commit d5dddf1733cc930864b5f542ce91515bded747e9
Author: James Hilliard <james.hilliard1 at gmail.com>

> mtd: rawnand: socrates: retain open-handle state on removal
>
> Keep chip metadata and controller storage alive until the final MTD
> reference is released. Unregister and disconnect each published chip
> before releasing the resources used by its hardware operations.
>
> Drain operations before unmapping the FPGA registers.
>
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>

[Severity: Low]
Since this fixes premature teardown in socrates_nand_remove() when an open
MTD handle outlives device unbind, should it include a Fixes tag?

  Fixes: 1b578193af3b ("[MTD] [NAND] Add support for NAND on the Socrates board")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-submit-rawnand-retained-handle-lifetime-v1-v2-0-9137d08f05df@gmail.com?part=20



More information about the linux-mtd mailing list