diff options
author | Christopher Brannon <chris@the-brannons.com> | 2012-06-22 08:16:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-07 08:35:51 -0700 |
commit | 2ce9883d42c658bcca161570a6e1e59a7dfc6ac2 (patch) | |
tree | c4586dd68dfda04f0938d1d405f24a897f03fac7 | |
parent | 0d5aa2d23227a041156ed568b4374901c68fb04f (diff) | |
download | lwn-2ce9883d42c658bcca161570a6e1e59a7dfc6ac2.tar.gz lwn-2ce9883d42c658bcca161570a6e1e59a7dfc6ac2.zip |
tty: keyboard.c: Remove locking from vt_get_leds.
commit 157a4b311c45c9aba75a990464d9680867dc8805 upstream.
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>
-rw-r--r-- | drivers/tty/vt/keyboard.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 48cc6f25cfd3..770a8544d53a 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; } |