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: <877bdd6a-0ab1-4d54-96ba-ca7073f882e7@sirena.org.uk>
Date: Wed, 26 Nov 2025 14:51:57 +0000
From: Mark Brown <broonie@...nel.org>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: sparkhuang <huangshaobo3@...omi.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Charles Keepax <ckeepax@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org, weipengliang@...omi.com,
	wengjinfei@...omi.com, caodan1@...omi.com
Subject: Re: [PATCH] regulator: core: Protect regulator_supply_alias_list
 with regulator_list_mutex

On Wed, Nov 26, 2025 at 02:44:06PM +0000, Charles Keepax wrote:
> On Wed, Nov 26, 2025 at 02:15:42PM +0800, sparkhuang wrote:

> > +	new_map->src_supply = id;
> > +	new_map->alias_dev = alias_dev;
> > +	new_map->alias_supply = alias_id;
> >  	list_add(&map->list, &regulator_supply_alias_list);

> In addition to Mark's comment the first argument here should be
> the new item to add. Personally I would be inclined to just leave
> the allocation inside the lock and not require the extra variable
> but up to you.

It is generally nicer to keep the locked region as small as possible.

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