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: <096aebcd-778c-4160-b478-bb26025f3940@web.de>
Date: Sun, 29 Sep 2024 10:45:44 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Chris Packham <chris.packham@...iedtelesis.co.nz>,
 linux-i2c@...r.kernel.org, linux-pm@...r.kernel.org,
 linux-mips@...r.kernel.org, devicetree@...r.kernel.org,
 Andi Shyti <andi.shyti@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>,
 Rob Herring <robh@...nel.org>, Sebastian Reichel <sre@...nel.org>,
 Thomas Bogendörfer <tsbogend@...ha.franken.de>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 6/6] i2c: Add driver for the RTL9300 I2C controller

…
> +++ b/drivers/i2c/busses/i2c-rtl9300.c
> @@ -0,0 +1,422 @@
…
> +static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned short flags,
> +				  char read_write, u8 command, int size,
> +				  union i2c_smbus_data *data)
> +{
…
> +	mutex_lock(&i2c->lock);
> +	if (chan->sda_pin != i2c->sda_pin) {
…
> +out_unlock:
> +	mutex_unlock(&i2c->lock);
> +
> +	return ret;
> +}
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&i2c->lock);”?
https://elixir.bootlin.com/linux/v6.11/source/include/linux/mutex.h#L196

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ