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: <20250320182242.401fd6af@kmaincent-XPS-13-7390>
Date: Thu, 20 Mar 2025 18:22:42 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
 Abeni <pabeni@...hat.com>, Jonathan Corbet <corbet@....net>, Donald Hunter
 <donald.hunter@...il.com>, Rob Herring <robh@...nel.org>, Andrew Lunn
 <andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>, Heiner Kallweit
 <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Liam
 Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Thomas
 Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
 linux-doc@...r.kernel.org, Kyle Swenson <kyle.swenson@....tech>, Dent
 Project <dentproject@...uxfoundation.org>, kernel@...gutronix.de, Maxime
 Chevallier <maxime.chevallier@...tlin.com>, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v6 11/12] net: pse-pd: tps23881: Add support
 for static port priority feature

On Mon, 17 Mar 2025 14:33:09 +0100
Oleksij Rempel <o.rempel@...gutronix.de> wrote:

> On Tue, Mar 04, 2025 at 11:19:00AM +0100, Kory Maincent wrote:
> > From: Kory Maincent (Dent Project) <kory.maincent@...tlin.com>
...
> > @@ -190,7 +201,22 @@ static int tps23881_pi_enable(struct
> > pse_controller_dev *pcdev, int id) BIT(chan % 4));
> >  	}
> >  
> > -	return i2c_smbus_write_word_data(client, TPS23881_REG_PW_EN, val);
> > +	ret = i2c_smbus_write_word_data(client, TPS23881_REG_PW_EN, val);
> > +	if (ret)
> > +		return ret;
> > +
> > +	/* Enable DC disconnect*/
> > +	chan = priv->port[id].chan[0];
> > +	ret = i2c_smbus_read_word_data(client, TPS23881_REG_DISC_EN);
> > +	if (ret < 0)
> > +		return ret;  
> 
> Here we have RMW operation without lock on two paths: pi_enable and
> pi_disable.

I don't understand, pi_enable and pi_disable are called with pcdev->lock
acquired thanks to the pse core.

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ