[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <173088259527.3252516.9517506943760955780.b4-ty@kernel.org>
Date: Wed, 06 Nov 2024 08:43:15 +0000
From: Lee Jones <lee@...nel.org>
To: Pavel Machek <pavel@....cz>, Lee Jones <lee@...nel.org>,
Mukesh Ojha <quic_mojha@...cinc.com>
Cc: linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: (subset) [PATCH v3] leds: class: Protect brightness_show()
with led_cdev->led_access mutex
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 [李琼斯]
Powered by blists - more mailing lists