aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorChristopher Brannon <chris@the-brannons.com>2012-06-22 09:16:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-06 17:28:17 -0400
commit157a4b311c45c9aba75a990464d9680867dc8805 (patch)
tree78c3cdd4f387121e7db5988aec9310e8c627c127 /drivers/tty/vt
parentf5e3bcc504c3c35cc6e06a9ee42efed7c274066b (diff)
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 <chris@the-brannons.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/keyboard.c3
1 files changed, 0 insertions, 3 deletions
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)
1049 */ 1049 */
1050int vt_get_leds(int console, int flag) 1050int vt_get_leds(int console, int flag)
1051{ 1051{
1052 unsigned long flags;
1053 struct kbd_struct * kbd = kbd_table + console; 1052 struct kbd_struct * kbd = kbd_table + console;
1054 int ret; 1053 int ret;
1055 1054
1056 spin_lock_irqsave(&kbd_event_lock, flags);
1057 ret = vc_kbd_led(kbd, flag); 1055 ret = vc_kbd_led(kbd, flag);
1058 spin_unlock_irqrestore(&kbd_event_lock, flags);
1059 1056
1060 return ret; 1057 return ret;
1061} 1058}