* tty: fix switching consoles during suspend
@ 2010-06-23 8:35 Arnd Bergmann
2010-06-23 22:12 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2010-06-23 8:35 UTC (permalink / raw)
To: Greg KH; +Cc: Alan Cox, linux-kernel
vt_waitactive now expects to be called with the big tty mutex, which
it tries to release before going to sleep.
This fixes the only caller that does not hold the BTM already.
---
Greg, please apply to the tty series or fold into
"tty: introduce wait_event_interruptible_tty", which introduces
the problem.
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 45410c8..2bbeaae 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -1761,10 +1761,13 @@ int vt_move_to_console(unsigned int vt, int alloc)
return -EIO;
}
release_console_sem();
+ tty_lock();
if (vt_waitactive(vt + 1)) {
pr_debug("Suspend: Can't switch VCs.");
+ tty_unlock();
return -EINTR;
}
+ tty_unlock();
return prev;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: tty: fix switching consoles during suspend
2010-06-23 8:35 tty: fix switching consoles during suspend Arnd Bergmann
@ 2010-06-23 22:12 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-06-23 22:12 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Greg KH, Alan Cox, linux-kernel
On Wed, Jun 23, 2010 at 10:35:21AM +0200, Arnd Bergmann wrote:
> vt_waitactive now expects to be called with the big tty mutex, which
> it tries to release before going to sleep.
>
> This fixes the only caller that does not hold the BTM already.
> ---
>
> Greg, please apply to the tty series or fold into
> "tty: introduce wait_event_interruptible_tty", which introduces
> the problem.
Now folded in and pushed out.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-23 22:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 8:35 tty: fix switching consoles during suspend Arnd Bergmann
2010-06-23 22:12 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox