* [PATCH] tty: keyboard.c: Remove locking from vt_get_leds.
@ 2012-06-22 13:16 Christopher Brannon
2012-06-22 13:34 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Brannon @ 2012-06-22 13:16 UTC (permalink / raw)
To: linux-kernel
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>
---
drivers/tty/vt/keyboard.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 48cc6f2..770a854 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;
}
--
1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] tty: keyboard.c: Remove locking from vt_get_leds.
2012-06-22 13:16 [PATCH] tty: keyboard.c: Remove locking from vt_get_leds Christopher Brannon
@ 2012-06-22 13:34 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2012-06-22 13:34 UTC (permalink / raw)
To: Christopher Brannon; +Cc: linux-kernel
On Fri, 22 Jun 2012 08:16:34 -0500
Christopher Brannon <chris@the-brannons.com> wrote:
> 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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-22 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-22 13:16 [PATCH] tty: keyboard.c: Remove locking from vt_get_leds Christopher Brannon
2012-06-22 13:34 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®