<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/leds, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-03-30T18:09:32Z</updated>
<entry>
<title>leds: trigger: netdev: use memcpy in device_name_store</title>
<updated>2019-03-30T18:09:32Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2019-03-14T14:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=909346433064b8d840dc82af26161926b8d37558'/>
<id>urn:sha1:909346433064b8d840dc82af26161926b8d37558</id>
<content type='text'>
If userspace doesn't end the input with a newline (which can easily
happen if the write happens from a C program that does write(fd,
iface, strlen(iface))), we may end up including garbage from a
previous, longer value in the device_name. For example

# cat device_name

# printf 'eth12' &gt; device_name
# cat device_name
eth12
# printf 'eth3' &gt; device_name
# cat device_name
eth32

I highly doubt anybody is relying on this behaviour, so switch to
simply copying the bytes (we've already checked that size is &lt;
IFNAMSIZ) and unconditionally zero-terminate it; of course, we also
still have to strip a trailing newline.

This is also preparation for future patches.

Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: pca9532: fix a potential NULL pointer dereference</title>
<updated>2019-03-30T17:50:00Z</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2019-03-09T06:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0aab8e4df4702b31314a27ec4b0631dfad0fae0a'/>
<id>urn:sha1:0aab8e4df4702b31314a27ec4b0631dfad0fae0a</id>
<content type='text'>
In case of_match_device cannot find a match, return -EINVAL to avoid
NULL pointer dereference.

Fixes: fa4191a609f2 ("leds: pca9532: Add device tree support")
Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: netdev: fix refcnt leak on interface rename</title>
<updated>2019-03-26T19:25:37Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2019-02-28T21:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cb6560514fa19d556954b88128f3846fee66a03'/>
<id>urn:sha1:4cb6560514fa19d556954b88128f3846fee66a03</id>
<content type='text'>
Renaming a netdev-trigger-tracked interface was resulting in an
unbalanced dev_hold().

Example:
&gt; iw phy phy0 interface add foo type __ap
&gt; echo netdev &gt; trigger
&gt; echo foo &gt; device_name
&gt; ip link set foo name bar
&gt; iw dev bar del
[  237.355366] unregister_netdevice: waiting for bar to become free. Usage count = 1
[  247.435362] unregister_netdevice: waiting for bar to become free. Usage count = 1
[  257.545366] unregister_netdevice: waiting for bar to become free. Usage count = 1

Above problem was caused by trigger checking a dev-&gt;name which obviously
changes after renaming an interface. It meant missing all further events
including the NETDEV_UNREGISTER which is required for calling dev_put().

This change fixes that by:
1) Comparing device struct *address* for notification-filtering purposes
2) Dropping unneeded NETDEV_CHANGENAME code (no behavior change)

Fixes: 06f502f57d0d ("leds: trigger: Introduce a NETDEV trigger")
Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86</title>
<updated>2019-03-10T20:16:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-03-10T20:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbbdf54c7206bf3f201f9ddaa5f4dd87835271cc'/>
<id>urn:sha1:dbbdf54c7206bf3f201f9ddaa5f4dd87835271cc</id>
<content type='text'>
Pull x86 platform driver updates from Darren Hart:

 - use MODULE_DEVICE_TABLE across several wmi drivers, keeping
   wmi_device_id and MODULE_ALIAS() declarations in sync

 - add several Ideapad models to the no_hw_rfkill list

 - add support for new Mellanox platforms, including new fan and LED
   functionality

 - address Dell keyboard backlight change event and power button release
   issues

 - update dell_rbu to use appropriate memory allocation mechanisms

 - several small fixes and Ice Lake support for intel_pmc_core

 - fix a suspend regression for Cherry Trail based devices in
   intel_int0002_vgpio

 - a few other routine fixes

* tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86: (50 commits)
  MAINTAINERS: Include mlxreg.h in Mellanox Platform Driver files
  platform/x86: ideapad-laptop: Add S130-14IGM to no_hw_rfkill list
  platform/x86: mlx-platform: Fix access mode for fan_dir attribute
  platform/x86: mlx-platform: Add UID LED for the next generation systems
  platform/x86: mlx-platform: Add extra CPLD for next generation systems
  platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
  platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
  modpost: file2alias: define size of alias
  platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
  platform/x86: ideapad-laptop: Add Ideapad 530S-14ARR to no_hw_rfkill list
  platform/x86: ideapad-laptop: Add Yoga C930 to no_hw_rfkill_list
  platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown
  platform/x86: intel_pmc_core: Add Package cstates residency info
  platform/x86: intel_pmc_core: Add ICL platform support
  ...
</content>
</entry>
<entry>
<title>Merge tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds</title>
<updated>2019-03-05T03:33:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-03-05T03:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd2a3bf02625ffad02a6b9f7df758ee36cf12769'/>
<id>urn:sha1:cd2a3bf02625ffad02a6b9f7df758ee36cf12769</id>
<content type='text'>
Pull LED updates from Jacek Anaszewski:

 - finalize previously announced support for initialization of pattern
   triggers from Device Tree

 - fix for null deref on firmware load failure in leds-lp55xx-common.c

* tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
  leds: lp55xx: fix null deref on firmware load failure
  leds: trigger: timer: Add initialization from Device Tree
  leds: trigger: oneshot: Add initialization from Device Tree
  leds: trigger: pattern: Add pattern initialization from Device Tree
  leds: Add helper for getting default pattern from Device Tree
  dt-bindings: leds: Add pattern initialization from Device Tree
</content>
</entry>
<entry>
<title>leds: mlxreg: Add support for capability register</title>
<updated>2019-02-23T17:20:46Z</updated>
<author>
<name>Vadim Pasternak</name>
<email>vadimp@mellanox.com</email>
</author>
<published>2019-02-19T11:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=530451d0df203e9603175db772941011450136f8'/>
<id>urn:sha1:530451d0df203e9603175db772941011450136f8</id>
<content type='text'>
Add support for capability register in order to distinct between the
systems with minor LED configuration differences. It reduces the amount
of code describing systems' LED configuration.
For example one system can be equipped with six LED, while the other
with only four. Reading this information from the capability registers
allows to use the same LED structure for such systems and set the
relevant configuration dynamically based on capability register
content.

Signed-off-by: Vadim Pasternak &lt;vadimp@mellanox.com&gt;
Acked-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
Signed-off-by: Darren Hart (VMware) &lt;dvhart@infradead.org&gt;
</content>
</entry>
<entry>
<title>leds: lp55xx: fix null deref on firmware load failure</title>
<updated>2019-02-14T21:03:44Z</updated>
<author>
<name>Michal Kazior</name>
<email>michal@plume.com</email>
</author>
<published>2019-02-11T09:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ddb0869bfc1bca6cfc592c74c64a026f936638c'/>
<id>urn:sha1:5ddb0869bfc1bca6cfc592c74c64a026f936638c</id>
<content type='text'>
I've stumbled upon a kernel crash and the logs
pointed me towards the lp5562 driver:

&gt; &lt;4&gt;[306013.841294] lp5562 0-0030: Direct firmware load for lp5562 failed with error -2
&gt; &lt;4&gt;[306013.894990] lp5562 0-0030: Falling back to user helper
&gt; ...
&gt; &lt;3&gt;[306073.924886] lp5562 0-0030: firmware request failed
&gt; &lt;1&gt;[306073.939456] Unable to handle kernel NULL pointer dereference at virtual address 00000000
&gt; &lt;4&gt;[306074.251011] PC is at _raw_spin_lock+0x1c/0x58
&gt; &lt;4&gt;[306074.255539] LR is at release_firmware+0x6c/0x138
&gt; ...

After taking a look I noticed firmware_release()
could be called with either NULL or a dangling
pointer.

Fixes: 10c06d178df11 ("leds-lp55xx: support firmware interface")
Signed-off-by: Michal Kazior &lt;michal@plume.com&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: lp5523: fix a missing check of return value of lp55xx_read</title>
<updated>2019-01-17T21:27:39Z</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2018-12-26T04:18:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=248b57015f35c94d4eae2fdd8c6febf5cd703900'/>
<id>urn:sha1:248b57015f35c94d4eae2fdd8c6febf5cd703900</id>
<content type='text'>
When lp55xx_read() fails, "status" is an uninitialized variable and thus
may contain random value; using it leads to undefined behaviors.

The fix inserts a check for the return value of lp55xx_read: if it
fails, returns with its error code.

Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: timer: Add initialization from Device Tree</title>
<updated>2019-01-16T21:09:25Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2019-01-09T14:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f85e8498a482cbfdab91fb2d1b81c6c8c1cfd15'/>
<id>urn:sha1:0f85e8498a482cbfdab91fb2d1b81c6c8c1cfd15</id>
<content type='text'>
Allow initialization of delays used in timer trigger from Device
Tree property.

This is especially useful for embedded systems where the trigger might
be used early, before bringing up user-space.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
<entry>
<title>leds: trigger: oneshot: Add initialization from Device Tree</title>
<updated>2019-01-16T21:09:18Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzk@kernel.org</email>
</author>
<published>2019-01-09T14:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c9ab51e86bf1f3a24eb3477cbe5d4fb09d386a5'/>
<id>urn:sha1:9c9ab51e86bf1f3a24eb3477cbe5d4fb09d386a5</id>
<content type='text'>
Allow initialization of delays used in oneshot trigger from Device
Tree property.

This is especially useful for embedded systems where the trigger might
be used early, before bringing up user-space.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Jacek Anaszewski &lt;jacek.anaszewski@gmail.com&gt;
</content>
</entry>
</feed>
