linux/drivers/input/mouse
Dmitry Torokhov 08bd5b7c9a Input: synaptics - fix crash when enabling pass-through port
When enabling a pass-through port an interrupt might come before psmouse
driver binds to the pass-through port. However synaptics sub-driver
tries to access psmouse instance presumably associated with the
pass-through port to figure out if only 1 byte of response or entire
protocol packet needs to be forwarded to the pass-through port and may
crash if psmouse instance has not been attached to the port yet.

Fix the crash by introducing open() and close() methods for the port and
check if the port is open before trying to access psmouse instance.
Because psmouse calls serio_open() only after attaching psmouse instance
to serio port instance this prevents the potential crash.

Reported-by: Takashi Iwai <tiwai@suse.de>
Fixes: 100e16959c ("Input: libps2 - attach ps2dev instances as serio port's drvdata")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1219522
Cc: stable@vger.kernel.org
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/Z4qSHORvPn7EU2j1@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-01-20 21:27:02 -08:00
..
Kconfig Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
Makefile Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
alps.c Input: alps - use guard notation when pausing serio port 2024-10-04 00:58:15 -07:00
alps.h
amimouse.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
appletouch.c
atarimouse.c
bcm5974.c Input: bcm5974 - use guard notation when acquiring mutex 2024-08-29 11:00:21 -07:00
byd.c Input: byd - use guard notation when pausing serio port 2024-10-04 00:58:15 -07:00
byd.h
cyapa.c
cyapa.h
cyapa_gen3.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cyapa_gen5.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cyapa_gen6.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cypress_ps2.c Input: cypress_ps2 - fix waiting for command response 2024-08-29 10:46:17 -07:00
cypress_ps2.h Input: cypress_ps2 - fix error handling when sending command fails 2024-07-03 13:48:53 -07:00
elan_i2c.h
elan_i2c_core.c Input: Use str_enable_disable-like helpers 2025-01-14 13:41:41 -08:00
elan_i2c_i2c.c Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
elan_i2c_smbus.c
elantech.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
elantech.h
focaltech.c
focaltech.h
gpio_mouse.c
hgpk.c
hgpk.h
inport.c
lifebook.c
lifebook.h
logibm.c
logips2pp.c
logips2pp.h
maplemouse.c
pc110pad.c
psmouse-base.c Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
psmouse-smbus.c Input: psmouse-smbus - use guard notation when acquiring mutex 2024-10-03 08:39:21 -07:00
psmouse.h Revert "Input: Add driver for PixArt PS/2 touchpad" 2024-10-01 03:54:05 -07:00
rpcmouse.c
sentelic.c
sentelic.h
sermouse.c
synaptics.c Input: synaptics - fix crash when enabling pass-through port 2025-01-20 21:27:02 -08:00
synaptics.h Input: synaptics - fix crash when enabling pass-through port 2025-01-20 21:27:02 -08:00
synaptics_i2c.c
synaptics_usb.c
touchkit_ps2.c
touchkit_ps2.h
trackpoint.c
trackpoint.h
vmmouse.c
vmmouse.h
vsxxxaa.c