From: Christopher Brannon Date: Fri, 22 Jun 2012 13:16:34 +0000 (-0500) Subject: tty: keyboard.c: Remove locking from vt_get_leds. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=157a4b311c45c9aba75a990464d9680867dc8805;p=linux-beck.git tty: keyboard.c: Remove locking from vt_get_leds. There are three call sites for this function, and all three are called within a keyboard handler. kbd_event_lock is already held within keyboard handlers, so attempting to lock it in vt_get_leds causes deadlock. Signed-off-by: Christopher Brannon Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 0b6217c93036..9b4f60a6ab0e 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -1049,13 +1049,10 @@ static int kbd_update_leds_helper(struct input_handle *handle, void *data) */ int vt_get_leds(int console, int flag) { - unsigned long flags; struct kbd_struct * kbd = kbd_table + console; int ret; - spin_lock_irqsave(&kbd_event_lock, flags); ret = vc_kbd_led(kbd, flag); - spin_unlock_irqrestore(&kbd_event_lock, flags); return ret; }