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: <dbf9ef52-78d4-476c-a2fe-11e6527e8ff3@web.de>
Date: Wed, 26 Jun 2024 20:08:24 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Christian Marangi <ansuelsmth@...il.com>, linux-leds@...r.kernel.org,
 devicetree@...r.kernel.org, Conor Dooley <conor+dt@...nel.org>,
 Jacek Anaszewski <jacek.anaszewski@...il.com>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>,
 Pavel Machek <pavel@....cz>, Rob Herring <robh@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 15/20] leds: leds-lp55xx: Generalize sysfs engine_load
 and engine_mode

…
> +++ b/drivers/leds/leds-lp55xx-common.c
…
> +ssize_t lp55xx_store_engine_load(struct device *dev,
> +				 struct device_attribute *attr,
> +				 const char *buf, size_t len, int nr)
…
> +	mutex_lock(&chip->lock);
> +
> +	chip->engine_idx = nr;
> +	lp55xx_load_engine(chip);
> +	ret = lp55xx_update_program_memory(chip, buf, len);
> +
> +	mutex_unlock(&chip->lock);
> +
> +	return ret;
> +}
…

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

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ