<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/input/misc, branch v6.7</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=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-12-23T07:34:06Z</updated>
<entry>
<title>Input: soc_button_array - add mapping for airplane mode button</title>
<updated>2023-12-23T07:34:06Z</updated>
<author>
<name>Christoffer Sandberg</name>
<email>cs@tuxedo.de</email>
</author>
<published>2023-12-23T07:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea3715941a9b7d816a1e9096ac0577900af2a69e'/>
<id>urn:sha1:ea3715941a9b7d816a1e9096ac0577900af2a69e</id>
<content type='text'>
This add a mapping for the airplane mode button on the TUXEDO Pulse Gen3.

While it is physically a key it behaves more like a switch, sending a key
down on first press and a key up on 2nd press. Therefor the switch event
is used here. Besides this behaviour it uses the HID usage-id 0xc6
(Wireless Radio Button) and not 0xc8 (Wireless Radio Slider Switch), but
since neither 0xc6 nor 0xc8 are currently implemented at all in
soc_button_array this not to standard behaviour is not put behind a quirk
for the moment.

Signed-off-by: Christoffer Sandberg &lt;cs@tuxedo.de&gt;
Signed-off-by: Werner Sembach &lt;wse@tuxedocomputers.com&gt;
Link: https://lore.kernel.org/r/20231215171718.80229-1-wse@tuxedocomputers.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' into for-linus</title>
<updated>2023-11-06T23:42:08Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2023-11-06T23:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdd5b5a9761fd66d17586e4f4ba6588c70e640ea'/>
<id>urn:sha1:cdd5b5a9761fd66d17586e4f4ba6588c70e640ea</id>
<content type='text'>
Prepare input updates for 6.7 merge window.
</content>
</entry>
<entry>
<title>Input: powermate - fix use-after-free in powermate_config_complete</title>
<updated>2023-10-14T03:17:02Z</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2023-10-14T03:11:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5c15c60e7be615f05a45cd905093a54b11f461bc'/>
<id>urn:sha1:5c15c60e7be615f05a45cd905093a54b11f461bc</id>
<content type='text'>
syzbot has found a use-after-free bug [1] in the powermate driver. This
happens when the device is disconnected, which leads to a memory free from
the powermate_device struct.  When an asynchronous control message
completes after the kfree and its callback is invoked, the lock does not
exist anymore and hence the bug.

Use usb_kill_urb() on pm-&gt;config to cancel any in-progress requests upon
device disconnection.

[1] https://syzkaller.appspot.com/bug?extid=0434ac83f907a1dbdd1e

Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Reported-by: syzbot+0434ac83f907a1dbdd1e@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20230916-topic-powermate_use_after_free-v3-1-64412b81a7a2@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: axp20x-pek - avoid needless newline removal</title>
<updated>2023-09-30T16:35:31Z</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-09-30T16:32:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68ede283a1d8fe0813b218aeb498faf3b0fc0a7b'/>
<id>urn:sha1:68ede283a1d8fe0813b218aeb498faf3b0fc0a7b</id>
<content type='text'>
This code is doing more work than it needs to.

Before handing off `val_str` to `kstrtouint()` we are eagerly removing
any trailing newline which requires copying `buf`, validating it's
length and checking/replacing any potential newlines.

kstrtouint() handles this implicitly:
kstrtouint -&gt;
  kstrotoull -&gt; (documentation)
|   /**
|    * kstrtoull - convert a string to an unsigned long long
|    * @s: The start of the string. The string must be null-terminated, and may also
|    *  include a single newline before its terminating null. The first character
|    ...

Let's remove the redundant functionality and let kstrtouint handle it.

Suggested-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Reviewed-by: Chen-Yu Tsai &lt;wens@csie.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20230925-strncpy-drivers-input-misc-axp20x-pek-c-v2-1-ff7abe8498d6@google.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: wm831x-on - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee3d5597133c03c7c200f63c51534c2ada24b8fc'/>
<id>urn:sha1:ee3d5597133c03c7c200f63c51534c2ada24b8fc</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-28-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: wistron_btns - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:58:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad43716068130dd22d14dc5223f5f5675d96fd12'/>
<id>urn:sha1:ad43716068130dd22d14dc5223f5f5675d96fd12</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-27-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: sparcspkr - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c55fb9780590b8612ef4338441687e6d2aff8c36'/>
<id>urn:sha1:c55fb9780590b8612ef4338441687e6d2aff8c36</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-26-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: soc_button_array - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c4fd21f4a6ffb0c8c2632470b602c0dde8ff20f'/>
<id>urn:sha1:2c4fd21f4a6ffb0c8c2632470b602c0dde8ff20f</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-25-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: pm8941-pwrkey - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a72aa189b2df3508c2fcbe41eec96530ed830e50'/>
<id>urn:sha1:a72aa189b2df3508c2fcbe41eec96530ed830e50</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@linaro.org&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-24-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: pcspkr - convert to platform remove callback returning void</title>
<updated>2023-09-24T02:16:44Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-20T12:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cd345ec1cf1350089bf02c66f5cd473c0a5a218'/>
<id>urn:sha1:5cd345ec1cf1350089bf02c66f5cd473c0a5a218</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230920125829.1478827-23-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
