Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mtd: rawnand: fix GPIO CS descriptor leaks
@ 2026-11-09  5:27 Zhao Feng
  2026-11-09  5:27 ` [PATCH 1/2] mtd: rawnand: fix GPIO descriptor leak in rawnand_dt_parse_gpio_cs() Zhao Feng
  2026-11-09  5:27 ` [PATCH 2/2] mtd: rawnand: arasan: fix GPIO CS leak on probe error paths Zhao Feng
  0 siblings, 2 replies; 4+ messages in thread
From: Zhao Feng @ 2026-11-09  5:27 UTC (permalink / raw)
  To: linux-mtd; +Cc: miquel.raynal, richard, michal.simek, linux-kernel, Zhao Feng

Two related fixes for GPIO chip-select descriptor leaks in the raw
NAND core helper and its in-tree user, the Arasan controller driver:

- patch 1 rolls back the already-acquired GPIO descriptors when
  rawnand_dt_parse_gpio_cs() fails midway through the cs-gpios array;
- patch 2 releases the parsed CS array on the arasan probe error
  paths (invalid DT layout and anfc_chips_init() failure), factoring
  the remove-time gpiod_put() loop into a shared helper.

Both issues date back to the gpio-cs support merged in 2021 and are
still present in current master.  Not runtime-tested (no hardware).

Zhao Feng (2):
  mtd: rawnand: fix GPIO descriptor leak in rawnand_dt_parse_gpio_cs()
  mtd: rawnand: arasan: fix GPIO CS leak on probe error paths

 drivers/mtd/nand/raw/arasan-nand-controller.c | 26 +++++++++++++++----
 drivers/mtd/nand/raw/nand_base.c              | 12 +++++++---
 2 files changed, 27 insertions(+), 11 deletions(-)

-- 
2.39.2




______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-09 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09  5:27 [PATCH 0/2] mtd: rawnand: fix GPIO CS descriptor leaks Zhao Feng
2026-11-09  5:27 ` [PATCH 1/2] mtd: rawnand: fix GPIO descriptor leak in rawnand_dt_parse_gpio_cs() Zhao Feng
2026-11-09 20:05   ` sashiko-bot
2026-11-09  5:27 ` [PATCH 2/2] mtd: rawnand: arasan: fix GPIO CS leak on probe error paths Zhao Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox