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]
Date: Wed, 26 Jun 2024 19:48:12 +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 <krzysztof.kozlowski@...aro.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 v7 10/20] leds: leds-lp55xx: Generalize led_brightness
 function

…
> +++ b/drivers/leds/leds-lp55xx-common.c
> @@ -242,6 +242,20 @@ void lp55xx_firmware_loaded_cb(struct lp55xx_chip *chip)
…
> +int lp55xx_led_brightness(struct lp55xx_led *led)
> +{
…
> +	mutex_lock(&chip->lock);
> +	ret = lp55xx_write(chip, cfg->reg_led_pwm_base.addr + led->chan_nr,
> +			   led->brightness);
> +	mutex_unlock(&chip->lock);
> +	return ret;
> +}
…

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