Skip to content

Commit

Permalink
tty: keyboard.c: Remove locking from vt_get_leds.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christopher Brannon authored and Greg Kroah-Hartman committed Jul 6, 2012
1 parent f5e3bcc commit 157a4b3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/tty/vt/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 157a4b3

Please sign in to comment.