Skip to content
Commit 19e95541 authored by Duncan Laurie's avatar Duncan Laurie Committed by Dmitry Torokhov
Browse files

Input: serio - clear pending rescans after sysfs driver rebind



When rebinding a serio driver via sysfs drvctl interface it is
possible for an interrupt to trigger after the disconnect of the
existing driver and before the binding of the new driver.  This will
cause the serio interrupt handler to queue a rescan event which will
disconnect the new driver immediately after it is attached.

This change removes pending rescans from the serio event queue after
processing the drvctl request but before releasing the serio mutex.

Reproduction involves issuing a rebind of device port from psmouse
driver to serio_raw driver while generating input to trigger
interrupts.  Then checking to see if the corresponding
i8042/serio4/driver is correctly attached to the serio_raw driver
instead of psmouse.

Signed-off-by: default avatarDuncan Laurie <dlaurie@chromium.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent e0d5f4c3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment