mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
LEDs Fixes
- Fix race condition leading to null pointer dereference on ThinkPad -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmlyDUAACgkQUa+KL4f8 d2EcOA/9GNDUv4zKgxiPlR577PkZklvmFH/pRws1YDqG8Huf5fH8H+MxwasgcgI9 l7lBHw8MxK8qaxnQgy4xzXdISfkbiVXFPuCHaP3DyS1YdY7u67BBfDWuh7xFqymk JB8dUw0g9DYsjFNjfngFkYndGv5Ynb/Mdu/pK72ZtdR43WGIZnwH+hTn7oYteHfc E+g6jZNA06+w+Z9suUJk92NDk+PoRFXkZo519i0uQamZMXDSXIuG2lTPSqZQplc2 sPnopmdr5l23cPYLu8/FZ4IADUtWv+E1UEDF1WxsJ4vnu3K7SBicsEOhx7Hknm5f KZt1zZlcJBp17drAoK2JCLtN0Hg5dNJLSZNGPlheVx2yexVX0oEGVIhEQr6rYT7b H5c7gbUSjPChMGn1ScI3KMv6vS/DQPJcwZ/CZ40uvJJitPfVlM75fooitKsP5qwi xAWnORL85BKzG2DH0m4Ynu/4O59kbl4G0c5jc5cSuenGZrC1qNMp94a2o6i2xwas 8PCdC2J86oAjJNVzluYPhT6P9zi8UQbErqfhY04gY4SuVwg2OoJFrh1+XoHTYErp ISE35ByEnTHKxvFpsAgRBohol3SpQyJ3t+fzGTdT6HBubwKzGnxHgegB3TCax47+ ENXB3a+Lns8i8zX2eqZ9xXdKZjkadehvRU7Bv5WO1CoGQ7I4YJ0= =RjDN -----END PGP SIGNATURE----- Merge tag 'leds-fixes-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED fix from Lee Jones: - Fix race condition leading to null pointer dereference on ThinkPad * tag 'leds-fixes-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: leds: led-class: Only Add LED to leds_list when it is fully ready
This commit is contained in:
commit
0309fc3cc0
|
|
@ -560,11 +560,6 @@ int led_classdev_register_ext(struct device *parent,
|
|||
#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
|
||||
led_cdev->brightness_hw_changed = -1;
|
||||
#endif
|
||||
/* add to the list of leds */
|
||||
down_write(&leds_list_lock);
|
||||
list_add_tail(&led_cdev->node, &leds_list);
|
||||
up_write(&leds_list_lock);
|
||||
|
||||
if (!led_cdev->max_brightness)
|
||||
led_cdev->max_brightness = LED_FULL;
|
||||
|
||||
|
|
@ -574,6 +569,11 @@ int led_classdev_register_ext(struct device *parent,
|
|||
|
||||
led_init_core(led_cdev);
|
||||
|
||||
/* add to the list of leds */
|
||||
down_write(&leds_list_lock);
|
||||
list_add_tail(&led_cdev->node, &leds_list);
|
||||
up_write(&leds_list_lock);
|
||||
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
led_trigger_set_default(led_cdev);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user