aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt_ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-06-01 16:53:05 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 16:47:43 -0400
commitbe1bc2889a4db4961ef69f47fb471ecae9f23ade (patch)
treefd6d5e46e69efd9d66e6baa184988461f608f49a /drivers/char/vt_ioctl.c
parent4e608671674b62e97166f903830d5553e37970e8 (diff)
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.c5
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)
133 list_add(&vw->list, &vt_events); 133 list_add(&vw->list, &vt_events);
134 spin_unlock_irqrestore(&vt_event_lock, flags); 134 spin_unlock_irqrestore(&vt_event_lock, flags);
135 /* Wait for it to pass */ 135 /* Wait for it to pass */
136 wait_event_interruptible(vt_event_waitqueue, vw->done); 136 wait_event_interruptible_tty(vt_event_waitqueue, vw->done);
137 /* Dequeue it */ 137 /* Dequeue it */
138 spin_lock_irqsave(&vt_event_lock, flags); 138 spin_lock_irqsave(&vt_event_lock, flags);
139 list_del(&vw->list); 139 list_del(&vw->list);
@@ -1761,10 +1761,13 @@ int vt_move_to_console(unsigned int vt, int alloc)
1761 return -EIO; 1761 return -EIO;
1762 } 1762 }
1763 release_console_sem(); 1763 release_console_sem();
1764 tty_lock();
1764 if (vt_waitactive(vt + 1)) { 1765 if (vt_waitactive(vt + 1)) {
1765 pr_debug("Suspend: Can't switch VCs."); 1766 pr_debug("Suspend: Can't switch VCs.");
1767 tty_unlock();
1766 return -EINTR; 1768 return -EINTR;
1767 } 1769 }
1770 tty_unlock();
1768 return prev; 1771 return prev;
1769} 1772}
1770 1773