Re: (subset) [PATCH v3] leds: class: Protect brightness_show() with led_cdev->led_access mutex
From: Lee Jones
Date: Wed Nov 06 2024 - 03:43:23 EST
On Sun, 03 Nov 2024 21:35:27 +0530, Mukesh Ojha wrote:
> There is NULL pointer issue observed if from Process A where hid device
> being added which results in adding a led_cdev addition and later a
> another call to access of led_cdev attribute from Process B can result
> in NULL pointer issue.
>
> Use mutex led_cdev->led_access to protect access to led->cdev and its
> attribute inside brightness_show() and max_brightness_show() and also
> update the comment for mutex that it should be used to protect the led
> class device fields.
>
> [...]
Applied, thanks!
[1/1] leds: class: Protect brightness_show() with led_cdev->led_access mutex
commit: 4ca7cd938725a4050dcd62ae9472e931d603118d
--
Lee Jones [李琼斯]