aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpiutil.c
diff options
context:
space:
mode:
authorHans de Goede <[email protected]>2022-02-28 22:59:34 -0800
committerDmitry Torokhov <[email protected]>2022-02-28 23:26:30 -0800
commit65de58c2a5b4bbe8ee1a42a5ee5b88163efa9855 (patch)
treeb9baf75b005ef2461437d74cac991a21a3c0c3ee /lib/mpi/mpiutil.c
parentae8e80c5f18dd08cc0c1ba43a17e11cf8b495d66 (diff)
Input: goodix - fix race on driver unbind
Because there is no way to detect if the touchscreen has pen support, the driver is allocating and registering the input_pen input_dev on receiving the first pen event. But this means that the input_dev gets allocated after the request_irq() call which means that the devm framework will free it before disabling the irq, leaving a window where the irq handler may run and reference the free-ed input_dev. To fix this move the allocation of the input_pen input_dev to before the request_irq() call, while still only registering it on the first pen event so that the driver does not advertise pen capability on touchscreens without it (most goodix touchscreens do not have pen support). Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions