lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92b95ceb-3c99-4977-b467-7bc5ee39a4d8@foss.st.com>
Date: Wed, 14 Jan 2026 18:19:22 +0100
From: Patrice CHOTARD <patrice.chotard@...s.st.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>, Andrew Jeffery
	<andrew@...econstruct.com.au>, Linus Walleij <linusw@...nel.org>, "Joel
 Stanley" <joel@....id.au>, Emil Renner Berthing <kernel@...il.dk>, Hal Feng
	<hal.feng@...rfivetech.com>, Chen Wang <unicorn_wang@...look.com>, "Inochi
 Amaoto" <inochiama@...il.com>, Basavaraj Natikar <Basavaraj.Natikar@....com>,
	Shyam Sundar S K <Shyam-sundar.S-k@....com>, Bartosz Golaszewski
	<brgl@...nel.org>, Steen Hegelund <Steen.Hegelund@...rochip.com>, "Daniel
 Machon" <daniel.machon@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
	"Thierry Reding" <thierry.reding@...il.com>, Jonathan Hunter
	<jonathanh@...dia.com>, Heiko Stuebner <heiko@...ech.de>
CC: <linux-aspeed@...ts.ozlabs.org>, <openbmc@...ts.ozlabs.org>,
	<linux-gpio@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <sophgo@...ts.linux.dev>,
	<linux-tegra@...r.kernel.org>, <linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH 11/11] pinctrl: st: Annotate st_pinconf_dbg_show() as
 holding mutex



On 1/14/26 16:30, Krzysztof Kozlowski wrote:
> st_pinconf_dbg_show() unlocks and locks the pinctrl_dev mutex, so it
> must be called by the pinctrl core with the mutex hold.  Annotate the
> function with sparse __must_hold, so any changes in pinctrl locking will
> be statically detected.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@....qualcomm.com>
> 
> ---
> 
> I think this is still useful, although maybe a bit pointless if core
> explicitly always locks every pin_config_dbg_show() call? Anyway,
> pattern of unlock+lock feels to me like something worth annotating.
> 
> I left the patch at the end of the set so it can be nicely discarded.
> ---
>  drivers/pinctrl/pinctrl-st.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index d3cea3437d7f..8ce88e591f47 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -987,6 +987,7 @@ static int st_pinconf_get(struct pinctrl_dev *pctldev,
>  
>  static void st_pinconf_dbg_show(struct pinctrl_dev *pctldev,
>  				   struct seq_file *s, unsigned pin_id)
> +	__must_hold(&pctldev->mutex)
>  {
>  	struct st_pio_control *pc;
>  	unsigned long config;
> 

Hi Krzysztof

Reviewed-by: Patrice Chotard <patrice.chotard@...s.st.com>

Thanks
Patrice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ