[PATCH 0/3] pinctrl: single: follow-up fixes from review
From: A. Sverdlin
Date: Thu Nov 19 2026 - 18:28:47 EST
From: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>
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@xxxxxxxxxx/
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