1
linux/drivers/input/keyboard
Eric W. Biederman 59b015133c Input: serio - fix potential deadlock when unbinding drivers
sysfs_remove_group() waits for sysfs attributes to be removed, therefore
we do not need to worry about driver-specific attributes being accessed
after driver has been detached from the device. In fact, attempts to take
serio->drv_mutex in attribute methods may lead to the following deadlock:

                                          sysfs_read_file()
                                            fill_read_buffer()
                                              sysfs_get_active_two()
                                                psmouse_attr_show_helper()
                                                  serio_pin_driver()
serio_disconnect_driver()
  mutex_lock(&serio->drv_mutex);
                                <-------->        mutex_lock(&serio_drv_mutex);
    psmouse_disconnect()
      sysfs_remove_group(... psmouse_attr_group);
        ....
        sysfs_deactivate();
          wait_for_completion();

Fix this by removing calls to serio_[un]pin_driver() and functions themselves
and using driver-private mutexes to serialize access to attribute's set()
methods that may change device state.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-06 00:14:32 -08:00
..
aaed2000_kbd.c
adp5520-keys.c input/keyboard: new driver for ADP5520 MFD PMICs 2009-12-13 19:20:53 +01:00
adp5588-keys.c Input: add driver for ADP5588 QWERTY I2C Keypad 2009-09-17 23:24:04 -07:00
amikbd.c
atakbd.c
atkbd.c Input: serio - fix potential deadlock when unbinding drivers 2010-01-06 00:14:32 -08:00
bf54x-keys.c Input: bf54x-keys - convert printk() to dev_*() 2009-07-23 01:16:11 -07:00
corgikbd.c Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel 2009-03-13 21:44:51 +00:00
davinci_keyscan.c Input: add DaVinci Keypad Driver 2009-10-13 23:58:45 -07:00
ep93xx_keypad.c Input: ep93xx_keypad - update driver to new core support 2009-12-15 08:54:45 -08:00
gpio_keys.c Input: gpio_keys - scan gpio state at probe and resume time 2009-11-30 00:05:20 -08:00
hil_kbd.c Input: combine hil_kbd and hil_ptr drivers 2009-08-09 13:27:27 -07:00
hilkbd.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
hpps2atkbd.h
jornada680_kbd.c
jornada720_kbd.c
Kconfig input/keyboard: new driver for ADP5520 MFD PMICs 2009-12-13 19:20:53 +01:00
lkkbd.c Input: lkkbd - change formatting style to match the rest of the kernel 2009-10-13 23:58:20 -07:00
lm8323.c Input: introduce lm8323 keypad driver 2009-05-15 20:13:25 -07:00
locomokbd.c
Makefile input/keyboard: new driver for ADP5520 MFD PMICs 2009-12-13 19:20:53 +01:00
maple_keyb.c sh: maple: Support block reads and writes. 2009-02-27 16:07:32 +09:00
matrix_keypad.c Input: matrix-keypad - handle cases when GPIOs can't be wakeup sources 2009-12-24 22:50:55 -08:00
max7359_keypad.c Input: max7359 - use threaded IRQs 2009-09-21 22:27:49 -07:00
newtonkbd.c
omap-keypad.c omap: headers: Move remaining headers from include/mach to include/plat 2009-10-20 09:40:47 -07:00
opencores-kbd.c Input: add driver for OpenCores Keyboard Controller 2009-09-17 23:24:02 -07:00
pxa27x_keypad.c Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
pxa930_rotary.c Input: add support for enhanced rotary controller on pxa930 and pxa935 2008-12-29 04:59:16 -08:00
qt2160.c Input: add driver for Atmel AT42QT2160 Sensor Chip 2009-09-22 20:50:08 -07:00
sh_keysc.c sh: Move KEYSC header file 2009-11-30 12:02:51 +09:00
spitzkbd.c Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel 2009-03-13 21:44:51 +00:00
stowaway.c
sunkbd.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
tosakbd.c Input: tosakbd - fix cleaning up KEY_STROBEs after error 2009-08-27 22:02:47 -07:00
twl4030_keypad.c Input: twl4030_keypad - switch to using threaded IRQ 2009-12-29 23:20:42 -08:00
w90p910_keypad.c Input: w90p910_keypad - move a dereference below a NULL test 2009-08-30 11:55:47 -07:00
xtkbd.c