linux-stable/drivers/input/mouse
Pavel Skripkin 975774ea75 Input: appletouch - initialize work before device registration
commit 9f3ccdc3f6 upstream.

Syzbot has reported warning in __flush_work(). This warning is caused by
work->func == NULL, which means missing work initialization.

This may happen, since input_dev->close() calls
cancel_work_sync(&dev->work), but dev->work initalization happens _after_
input_register_device() call.

So this patch moves dev->work initialization before registering input
device

Fixes: 5a6eb676d3 ("Input: appletouch - improve powersaving for Geyser3 devices")
Reported-and-tested-by: syzbot+b88c5eae27386b252bbd@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/20211230141151.17300-1-paskripkin@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-05 12:37:46 +01:00
..
alps.c
alps.h
amimouse.c
appletouch.c Input: appletouch - initialize work before device registration 2022-01-05 12:37:46 +01:00
atarimouse.c
bcm5974.c
byd.c
byd.h
cyapa.c
cyapa.h
cyapa_gen3.c
cyapa_gen5.c
cyapa_gen6.c
cypress_ps2.c
cypress_ps2.h
elan_i2c.h
elan_i2c_core.c
elan_i2c_i2c.c
elan_i2c_smbus.c
elantech.c Input: elantech - fix stack out of bound access in elantech_change_report_id() 2021-12-29 12:23:35 +01:00
elantech.h
focaltech.c
focaltech.h
gpio_mouse.c
hgpk.c
hgpk.h
inport.c
Kconfig
lifebook.c
lifebook.h
logibm.c
logips2pp.c
logips2pp.h
Makefile
maplemouse.c
navpoint.c
pc110pad.c
psmouse-base.c
psmouse-smbus.c
psmouse.h
pxa930_trkball.c
rpcmouse.c
sentelic.c
sentelic.h
sermouse.c
synaptics.c
synaptics.h
synaptics_i2c.c
synaptics_usb.c
touchkit_ps2.c
touchkit_ps2.h
trackpoint.c
trackpoint.h
vmmouse.c
vmmouse.h
vsxxxaa.c