]> git.baikalelectronics.ru Git - kernel.git/commit
Input: reduce raciness when input handlers disconnect
authorDmitry Torokhov <dtor@insightbb.com>
Mon, 4 Jun 2007 03:29:36 +0000 (23:29 -0400)
committerDmitry Torokhov <dtor@insightbb.com>
Mon, 4 Jun 2007 03:50:05 +0000 (23:50 -0400)
commit9f01b22da6875a12e0c204f1d4a77fc5c65e9061
tree2533af73ff0e1e4d24603967bd6cdc092973dce9
parent720f73150f301f2a3ebf0f5b30ef9bca382e42d1
Input: reduce raciness when input handlers disconnect

There is a race between input handler's release() and disconnect()
methods: when input handler disconnects it wakes up all regular
users and then process to walk user list to wake up async. users.
While disconnect() walks the list release() removes elements of
the same list causing oopses.

While this is not a substibute for proper locking we can reduce
odds of getting an oops if we wake up normal readers after walking
the list.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/evdev.c
drivers/input/joydev.c
drivers/input/mousedev.c
drivers/input/tsdev.c