<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/leds, branch v5.4.76</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.76</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.76'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-11-05T10:43:24Z</updated>
<entry>
<title>leds: bcm6328, bcm6358: use devres LED registering function</title>
<updated>2020-11-05T10:43:24Z</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2020-09-17T22:32:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8ac92a5e5fd76ca866ac7279dd8954304110379f'/>
<id>urn:sha1:8ac92a5e5fd76ca866ac7279dd8954304110379f</id>
<content type='text'>
commit ff5c89d44453e7ad99502b04bf798a3fc32c758b upstream.

These two drivers do not provide remove method and use devres for
allocation of other resources, yet they use led_classdev_register
instead of the devres variant, devm_led_classdev_register.

Fix this.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Cc: Álvaro Fernández Rojas &lt;noltari@gmail.com&gt;
Cc: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Cc: Jaedon Shin &lt;jaedon.shin@gmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: mlxreg: Fix possible buffer overflow</title>
<updated>2020-10-01T11:17:14Z</updated>
<author>
<name>Oleh Kravchenko</name>
<email>oleg@kaa.org.ua</email>
</author>
<published>2019-10-16T07:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e645b649c418733d91a9f70f34ee7eae0988c502'/>
<id>urn:sha1:e645b649c418733d91a9f70f34ee7eae0988c502</id>
<content type='text'>
[ Upstream commit 7c6082b903ac28dc3f383fba57c6f9e7e2594178 ]

Error was detected by PVS-Studio:
V512 A call of the 'sprintf' function will lead to overflow of
the buffer 'led_data-&gt;led_cdev_name'.

Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Oleh Kravchenko &lt;oleg@kaa.org.ua&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: core: Flush scheduled work for system suspend</title>
<updated>2020-08-19T06:16:11Z</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2020-07-02T05:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d25c81232007aeb689f9690e0991305ff7474c49'/>
<id>urn:sha1:d25c81232007aeb689f9690e0991305ff7474c49</id>
<content type='text'>
[ Upstream commit 302a085c20194bfa7df52e0fe684ee0c41da02e6 ]

Sometimes LED won't be turned off by LED_CORE_SUSPENDRESUME flag upon
system suspend.

led_set_brightness_nopm() uses schedule_work() to set LED brightness.
However, there's no guarantee that the scheduled work gets executed
because no one flushes the work.

So flush the scheduled work to make sure LED gets turned off.

Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Fixes: 81fe8e5b73e3 ("leds: core: Add led_set_brightness_nosleep{nopm} functions")
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: lm355x: avoid enum conversion warning</title>
<updated>2020-08-19T06:16:07Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-05-05T14:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6db3579dd3a464197e7d7ef00497ab9913e368f8'/>
<id>urn:sha1:6db3579dd3a464197e7d7ef00497ab9913e368f8</id>
<content type='text'>
[ Upstream commit 985b1f596f9ed56f42b8c2280005f943e1434c06 ]

clang points out that doing arithmetic between diffent enums is usually
a mistake:

drivers/leds/leds-lm355x.c:167:28: warning: bitwise operation between different enumeration types ('enum lm355x_tx2' and 'enum lm355x_ntc') [-Wenum-enum-conversion]
                reg_val = pdata-&gt;pin_tx2 | pdata-&gt;ntc_pin;
                          ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
drivers/leds/leds-lm355x.c:178:28: warning: bitwise operation between different enumeration types ('enum lm355x_tx2' and 'enum lm355x_ntc') [-Wenum-enum-conversion]
                reg_val = pdata-&gt;pin_tx2 | pdata-&gt;ntc_pin | pdata-&gt;pass_mode;
                          ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~

In this driver, it is intentional, so add a cast to hide the false-positive
warning. It appears to be the only instance of this warning at the moment.

Fixes: b98d13c72592 ("leds: Add new LED driver for lm355x chips")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>leds: 88pm860x: fix use-after-free on unbind</title>
<updated>2020-08-11T13:33:36Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-06-01T13:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fe6402e0e66cfeb957bf9c25a37df392028fcf4f'/>
<id>urn:sha1:fe6402e0e66cfeb957bf9c25a37df392028fcf4f</id>
<content type='text'>
commit eca21c2d8655387823d695b26e6fe78cf3975c05 upstream.

Several MFD child drivers register their class devices directly under
the parent device. This means you cannot blindly do devres conversions
so that deregistration ends up being tied to the parent device,
something which leads to use-after-free on driver unbind when the class
device is released while still being registered.

Fixes: 375446df95ee ("leds: 88pm860x: Use devm_led_classdev_register")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.6
Cc: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: lm3533: fix use-after-free on unbind</title>
<updated>2020-08-11T13:33:36Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-06-01T13:39:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3564cddefb5bd0de65510cd17da2253808eef6e7'/>
<id>urn:sha1:3564cddefb5bd0de65510cd17da2253808eef6e7</id>
<content type='text'>
commit d584221e683bbd173738603b83a315f27d27d043 upstream.

Several MFD child drivers register their class devices directly under
the parent device. This means you cannot blindly do devres conversions
so that deregistration ends up being tied to the parent device,
something which leads to use-after-free on driver unbind when the class
device is released while still being registered.

Fixes: 50154e29e5cc ("leds: lm3533: Use devm_led_classdev_register")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.6
Cc: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: da903x: fix use-after-free on unbind</title>
<updated>2020-08-11T13:33:36Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-06-01T13:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=385c1ae9ddb936033cf76a9ed62d8e3e5a5a85e6'/>
<id>urn:sha1:385c1ae9ddb936033cf76a9ed62d8e3e5a5a85e6</id>
<content type='text'>
commit 6f4aa35744f69ed9b0bf5a736c9ca9b44bc1dcea upstream.

Several MFD child drivers register their class devices directly under
the parent device. This means you cannot blindly do devres conversions
so that deregistration ends up being tied to the parent device,
something which leads to use-after-free on driver unbind when the class
device is released while still being registered.

Fixes: eed16255d66b ("leds: da903x: Use devm_led_classdev_register")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.6
Cc: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: lm36274: fix use-after-free on unbind</title>
<updated>2020-08-11T13:33:36Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-06-01T13:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bde8f23c030c77917b61eeaa5824e3743da7e679'/>
<id>urn:sha1:bde8f23c030c77917b61eeaa5824e3743da7e679</id>
<content type='text'>
commit a0972fff09479dd09b731360a3a0b09e4fb4d415 upstream.

Several MFD child drivers register their class devices directly under
the parent device. This means you cannot use devres so that
deregistration ends up being tied to the parent device, something which
leads to use-after-free on driver unbind when the class device is
released while still being registered.

Fixes: 11e1bbc116a7 ("leds: lm36274: Introduce the TI LM36274 LED driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 5.3
Cc: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: wm831x-status: fix use-after-free on unbind</title>
<updated>2020-08-11T13:33:35Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-06-01T13:39:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=635f8fcc2ee39d3c7e707ee5f7b2c55c6e277f4b'/>
<id>urn:sha1:635f8fcc2ee39d3c7e707ee5f7b2c55c6e277f4b</id>
<content type='text'>
commit 47a459ecc800a17109d0c496a4e21e478806ee40 upstream.

Several MFD child drivers register their class devices directly under
the parent device. This means you cannot blindly do devres conversions
so that deregistration ends up being tied to the parent device,
something which leads to use-after-free on driver unbind when the class
device is released while still being registered.

Fixes: 8d3b6a4001ce ("leds: wm831x-status: Use devm_led_classdev_register")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 4.6
Cc: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>leds: core: Fix warning message when init_data</title>
<updated>2020-04-23T08:36:37Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ribalda@kernel.org</email>
</author>
<published>2020-04-01T09:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a9282e58238d228c76fbefa3f1b8200eee716378'/>
<id>urn:sha1:a9282e58238d228c76fbefa3f1b8200eee716378</id>
<content type='text'>
[ Upstream commit 64ed6588c2ea618d3f9ca9d8b365ae4c19f76225 ]

The warning message when a led is renamed due to name collition can fail
to show proper original name if init_data is used. Eg:

[    9.073996] leds-gpio a0040000.leds_0: Led (null) renamed to red_led_1 due to name collision

Fixes: bb4e9af0348d ("leds: core: Add support for composing LED class device names")
Signed-off-by: Ricardo Ribalda Delgado &lt;ribalda@kernel.org&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
