Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] pinctrl: single: follow-up fixes from review
@ 2026-11-19 23:28 A. Sverdlin
  2026-11-19 23:28 ` [PATCH 1/3] pinctrl: single: Also free the pinconf table of a duplicate function A. Sverdlin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: A. Sverdlin @ 2026-11-19 23:28 UTC (permalink / raw)
  To: linux-gpio
  Cc: Alexander Sverdlin, Tony Lindgren, Haojian Zhuang, Linus Walleij,
	linux-arm-kernel, linux-omap, linux-kernel, Lee Jones

From: Alexander Sverdlin <alexander.sverdlin@siemens.com>

These are follow-ups to commit ad2093840ca3 ("pinctrl: single: don't leak
group/function tables on consumer re-probe") in pinctrl/for-next, which
this series is based on. All three issues were found in code review
(partly while reviewing Lee's recent pinctrl-single series [1]). None of
them was reproduced, so the series is compile-tested only (W=1, ARM).

1/3 is a gap in ad2093840ca3 itself: the duplicate function is freed, but
its pinconf table isn't. My re-probe testing of ad2093840ca3 (TPM
bind/unbind loop on an AM625 board, watching the slab counters) could not
have shown it. That controller is plain "pinctrl-single" without
PCS_FEAT_PINCONF, so pcs_parse_pinconf() never runs there. kmemleak
doesn't see it either, because the table stays reachable through devres.

2/3 fixes error paths that remove a group/function the core deduplicated,
i.e. one still used by an earlier mapping. Reaching them needs an
allocation failure during a consumer re-probe.

3/3 rejects bit-per-mux without a usable function mask. Such DTs pass
dt-validate but divide by zero at runtime. Checked with dt-validate and
against all in-tree bit-per-mux users, but not booted.

[1] https://lore.kernel.org/all/20261119205013.2563811-10-lee@kernel.org/

Alexander Sverdlin (3):
  pinctrl: single: Also free the pinconf table of a duplicate function
  pinctrl: single: Don't remove deduplicated groups and functions on
    error
  pinctrl: single: Reject bit-per-mux without a usable function mask

 drivers/pinctrl/pinctrl-single.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

-- 
2.56.1


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

end of thread, other threads:[~2026-11-19 23:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 23:28 [PATCH 0/3] pinctrl: single: follow-up fixes from review A. Sverdlin
2026-11-19 23:28 ` [PATCH 1/3] pinctrl: single: Also free the pinconf table of a duplicate function A. Sverdlin
2026-11-19 23:43   ` sashiko-bot
2026-11-19 23:28 ` [PATCH 2/3] pinctrl: single: Don't remove deduplicated groups and functions on error A. Sverdlin
2026-11-19 23:28 ` [PATCH 3/3] pinctrl: single: Reject bit-per-mux without a usable function mask A. Sverdlin
2026-11-19 23:42   ` sashiko-bot

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