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: <20250327154858.4498-1-trannamatk@gmail.com>
Date: Thu, 27 Mar 2025 22:48:58 +0700
From: Nam Tran <trannamatk@...il.com>
To: Markus.Elfring@....de
Cc: pavel@...nel.org,
	lee@...nel.org,
	krzk+dt@...nel.org,
	robh@...nel.org,
	conor+dt@...nel.org,
	devicetree@...r.kernel.org,
	linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] leds: add new LED driver for TI LP5812

> …
> > +++ b/drivers/leds/leds-lp5812.c
> > @@ -0,0 +1,2190 @@
> …
> > +static ssize_t device_enable_show(struct device *dev,
> > +		struct device_attribute *attr,
> > +		char *buf)
> > +{
> …
> > +	mutex_lock(&chip->lock);
> > +	if (lp5812_read(chip, chip->regs->enable_reg, &enable)) {
> > +		mutex_unlock(&chip->lock);
> > +		return -EIO;
> > +	}
> > +	mutex_unlock(&chip->lock);
> > +
> > +	return sprintf(buf, "%d\n", enable);
> > +}
> …
> 
> Under which circumstances would you become interested to apply a statement
> like “guard(mutex)(&chip->lock);”?
> https://elixir.bootlin.com/linux/v6.14-rc6/source/include/linux/mutex.h#L201

Thank you for your suggestion regarding the use of guard(mutex)(&chip->lock).
While we understand the impacts of this approach, we are currently not planning to change the source code in this version.
We will consider incorporating this improvement in the next TI LED version.

Best regards,
Nam Tran

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ