android_kernel_motorola_sm6375/drivers/input
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dmitry Torokhov 69aff1b73c Input: synaptics-rmi - fix crash with unsupported versions of F34
[ Upstream commit ca39500f6af9cfe6823dc5aa8fbaed788d6e35b2 ]

Sysfs interface for updating firmware for RMI devices is available even
when F34 probe fails. The code checks for presence of F34 "container"
pointer and then tries to use the function data attached to the
sub-device. F34 assigns the function data early, before it knows if
probe will succeed, leaving behind a stale pointer.

Fix this by expanding checks to not only test for presence of F34
"container" but also check if there is driver data assigned to the
sub-device, and call dev_set_drvdata() only after we are certain that
probe is successful.

This is not a complete fix, since F34 will be freed during firmware
update, so there is still a race when fetching and accessing this
pointer. This race will be addressed in follow-up changes.

Reported-by: Hanno Böck <hanno@hboeck.de>
Fixes: 29fd0ec2bd ("Input: synaptics-rmi4 - add support for F34 device reflash")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/aBlAl6sGulam-Qcx@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-27 11:02:49 +01:00
..
gameport
joystick Input: xpad - add support for wooting two he (arm) 2025-02-01 18:18:54 +01:00
keyboard Input: atkbd - map F23 key to support default copilot shortcut 2025-02-01 18:18:53 +01:00
misc Input: uinput - reject requests with unreasonable number of slots 2024-09-12 11:03:55 +02:00
mouse Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5 2025-06-04 14:32:29 +02:00
rmi4 Input: synaptics-rmi - fix crash with unsupported versions of F34 2025-06-27 11:02:49 +01:00
serio Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU 2024-03-15 10:48:18 -04:00
tablet
touchscreen Input: silead - Always support 10 fingers 2024-07-27 10:38:29 +02:00
apm-power.c
evbug.c
evdev.c
ff-core.c Input: ff-core - prefer struct_size over open coded arithmetic 2024-07-18 11:40:48 +02:00
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c Input: MT - limit max slots 2024-09-04 13:15:01 +02:00
input-polldev.c
input-poller.c
input-poller.h
input.c Input: try trimming too long modalias strings 2024-07-05 09:08:16 +02:00
joydev.c
Kconfig
Makefile
matrix-keymap.c
mousedev.c
sparse-keymap.c