tty: keyboard.c: Remove locking from vt_get_leds.
authorChristopher Brannon <chris@the-brannons.com>
Fri, 22 Jun 2012 13:16:34 +0000 (08:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 21:28:17 +0000 (14:28 -0700)
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 <chris@the-brannons.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c

index 0b6217c9303601964fb3f5fd1d02f72bfafbb186..9b4f60a6ab0e58d672c05cd8c705a5504bfec80b 100644 (file)
@@ -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;
 }