linux/drivers/input/rmi4
Dmitry Torokhov fe10579b6d Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound
Transport drivers (such as rmi_i2c and rmi_spi) invoke
rmi_driver_suspend() and rmi_driver_resume() on their child rmi_dev
device during system power management events. However, transport drivers
are fully registered and operational even if the physical RMI driver
failed to bind or probe the rmi_dev device.

When rmi_driver_suspend() or rmi_driver_resume() is called on an unbound
rmi_dev, dev_get_drvdata() returns NULL. Calling rmi_disable_irq() or
rmi_enable_irq() without driver data attached causes a NULL pointer
dereference and General Protection Fault when attempting to lock
data->enabled_mutex.

Fix this by checking if driver data is attached to rmi_dev in
rmi_driver_suspend() and rmi_driver_resume(), exiting early if
no driver data is present.

Fixes: 2b6a321da9 ("Input: synaptics-rmi4 - add support for Synaptics RMI4 devices")
Reported-by: syzbot+09103639e39c989e3ed3@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=09103639e39c989e3ed3
Cc: stable@vger.kernel.org
Assisted-by: LLM
Link: https://patch.msgid.link/anQe8UiyUR4x0flD@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-08-30 14:56:26 -07:00
..
Kconfig Input: synaptics-rmi4 - add support for F1A 2025-07-27 01:41:19 -07:00
Makefile Input: synaptics-rmi4 - add support for F1A 2025-07-27 01:41:19 -07:00
rmi_2d_sensor.c Input: include export.h in modules using EXPORT_SYMBOL*() 2025-08-21 12:00:59 -07:00
rmi_2d_sensor.h Input: rmi4 - change reg_size type to u32 2026-06-11 22:39:29 -07:00
rmi_bus.c Input: rmi4 - use kzalloc_flex() for struct rmi_function 2026-06-11 22:39:28 -07:00
rmi_bus.h Input: rmi4 - refactor function allocation and registration 2026-06-11 22:39:28 -07:00
rmi_driver.c Input: synaptics-rmi4 - fix GPF in suspend and resume when unbound 2026-08-30 14:56:26 -07:00
rmi_driver.h Input: rmi4 - change reg_size type to u32 2026-06-11 22:39:29 -07:00
rmi_f01.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rmi_f1a.c Input: synaptics-rmi4 - add support for F1A 2025-07-27 01:41:19 -07:00
rmi_f03.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rmi_f3a.c Input: synaptics-rmi4 - bound the F3A keymap to the GPIO count 2026-06-25 17:46:20 -07:00
rmi_f11.c Input: rmi4 - change reg_size type to u32 2026-06-11 22:39:29 -07:00
rmi_f12.c Input: rmi4 - use platform data instead of query, when available 2026-08-13 12:13:43 -07:00
rmi_f21.c Input: synaptics-rmi4 - add support for Forcepads (F21) 2025-07-27 01:24:21 -07:00
rmi_f30.c Input: synaptics-rmi4 - bound the F30 keymap to the GPIO/LED count 2026-06-25 17:46:20 -07:00
rmi_f34.c Input: synaptics-rmi - fix crash with unsupported versions of F34 2025-05-19 11:58:36 -07:00
rmi_f34.h Input: synaptics-rmi4 - remove unneeded struct register_offset 2022-09-23 13:00:13 -07:00
rmi_f34v7.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rmi_f54.c Input: synaptics-rmi4 - propagate F54 worker errors to V4L2 queue 2026-08-05 10:09:53 -07:00
rmi_f55.c Input: synaptics-rmi4 - fix F55 transmitter electrode count typo 2026-08-04 21:16:42 -07:00
rmi_i2c.c Input: Use named initializers for arrays of i2c_device_data 2026-05-30 22:10:47 -07:00
rmi_smbus.c Input: rmi_smbus - fix out-of-bounds read in rmi_smb_write_block() 2026-08-30 14:42:00 -07:00
rmi_spi.c Input: synaptics-rmi4 - follow renaming of SPI "master" to "controller" 2024-02-08 11:54:39 +00:00