Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 157a4b31 authored by Christopher Brannon's avatar Christopher Brannon Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristopher Brannon <chris@the-brannons.com>
Acked-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5e3bcc5
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -1049,13 +1049,10 @@ static int kbd_update_leds_helper(struct input_handle *handle, void *data)
 */
 */
int vt_get_leds(int console, int flag)
int vt_get_leds(int console, int flag)
{
{
	unsigned long flags;
	struct kbd_struct * kbd = kbd_table + console;
	struct kbd_struct * kbd = kbd_table + console;
	int ret;
	int ret;


	spin_lock_irqsave(&kbd_event_lock, flags);
	ret = vc_kbd_led(kbd, flag);
	ret = vc_kbd_led(kbd, flag);
	spin_unlock_irqrestore(&kbd_event_lock, flags);


	return ret;
	return ret;
}
}