diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-06-02 00:53:05 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-11 00:47:43 +0400 |
commit | be1bc2889a4db4961ef69f47fb471ecae9f23ade (patch) | |
tree | fd6d5e46e69efd9d66e6baa184988461f608f49a /drivers/char/vt_ioctl.c | |
parent | 4e608671674b62e97166f903830d5553e37970e8 (diff) | |
download | linux-be1bc2889a4db4961ef69f47fb471ecae9f23ade.tar.xz |
tty: introduce wait_event_interruptible_tty
Calling wait_event_interruptible implicitly
releases the BKL when it sleeps, but we need
to do this explcitly when we have converted
it to a mutex.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r-- | drivers/char/vt_ioctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index cf87c5336229..2bbeaaea46e9 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -133,7 +133,7 @@ static void vt_event_wait(struct vt_event_wait *vw) list_add(&vw->list, &vt_events); spin_unlock_irqrestore(&vt_event_lock, flags); /* Wait for it to pass */ - wait_event_interruptible(vt_event_waitqueue, vw->done); + wait_event_interruptible_tty(vt_event_waitqueue, vw->done); /* Dequeue it */ spin_lock_irqsave(&vt_event_lock, flags); list_del(&vw->list); @@ -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; } |