59b015133c
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> |
||
---|---|---|
.. | ||
aaed2000_kbd.c | ||
adp5520-keys.c | ||
adp5588-keys.c | ||
amikbd.c | ||
atakbd.c | ||
atkbd.c | ||
bf54x-keys.c | ||
corgikbd.c | ||
davinci_keyscan.c | ||
ep93xx_keypad.c | ||
gpio_keys.c | ||
hil_kbd.c | ||
hilkbd.c | ||
hpps2atkbd.h | ||
jornada680_kbd.c | ||
jornada720_kbd.c | ||
Kconfig | ||
lkkbd.c | ||
lm8323.c | ||
locomokbd.c | ||
Makefile | ||
maple_keyb.c | ||
matrix_keypad.c | ||
max7359_keypad.c | ||
newtonkbd.c | ||
omap-keypad.c | ||
opencores-kbd.c | ||
pxa27x_keypad.c | ||
pxa930_rotary.c | ||
qt2160.c | ||
sh_keysc.c | ||
spitzkbd.c | ||
stowaway.c | ||
sunkbd.c | ||
tosakbd.c | ||
twl4030_keypad.c | ||
w90p910_keypad.c | ||
xtkbd.c |