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] [day] [month] [year] [list]
Message-ID: <aef15c49-1f6f-4da2-ac89-c9ad0090a99a@sirena.org.uk>
Date: Tue, 6 Jan 2026 12:27:35 +0000
From: Mark Brown <broonie@...nel.org>
To: Yu-Chun Lin <eleanor.lin@...ltek.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, dakr@...nel.org,
	baolin.wang@...ux.alibaba.com, cylee12@...ltek.com,
	linux-kernel@...r.kernel.org, james.tai@...ltek.com,
	cy.huang@...ltek.com, stanley_chang@...ltek.com
Subject: Re: [PATCH] regmap: Fix race condition in hwspinlock irqsave routine

On Tue, Jan 06, 2026 at 10:15:01AM +0800, Yu-Chun Lin wrote:

>  static void regmap_lock_hwlock_irqsave(void *__map)
>  {
>  	struct regmap *map = __map;
> +	unsigned long flags;
>  
>  	hwspin_lock_timeout_irqsave(map->hwlock, UINT_MAX,
> -				    &map->spinlock_flags);
> +				    &flags);
> +	map->spinlock_flags = flags;

This breaks a -Werror build:

/build/stage/linux/drivers/base/regmap/regmap.c: In function ‘regmap_lock_hwlock_irqsave’:
/build/stage/linux/drivers/base/regmap/regmap.c:415:29: error: ‘flags’ is used uninitialized [-Werror=uninitialized]
  415 |         map->spinlock_flags = flags;
      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~~
/build/stage/linux/drivers/base/regmap/regmap.c:411:23: note: ‘flags’ was declared here
  411 |         unsigned long flags;
      |                       ^~~~~

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ