X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fchar%2Ftty_io.c;h=e94bee0323148548d9374852e7b140999af40b81;hb=9ffee4cbc51907755809d98613d9e7133612803a;hp=49c1a2267a55c7490c504ba7486b276575851ae8;hpb=e7e72bf641b1fc7b9df6f40bd2c36dfccd8d647c;p=linux-2.6-omap-h63xx.git diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 49c1a2267a5..e94bee03231 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1215,10 +1215,11 @@ int tty_check_change(struct tty_struct *tty) if (!tty->pgrp) { printk(KERN_WARNING "tty_check_change: tty->pgrp == NULL!\n"); - goto out; + goto out_unlock; } if (task_pgrp(current) == tty->pgrp) - goto out; + goto out_unlock; + spin_unlock_irqrestore(&tty->ctrl_lock, flags); if (is_ignored(SIGTTOU)) goto out; if (is_current_pgrp_orphaned()) { @@ -1229,6 +1230,8 @@ int tty_check_change(struct tty_struct *tty) set_thread_flag(TIF_SIGPENDING); ret = -ERESTARTSYS; out: + return ret; +out_unlock: spin_unlock_irqrestore(&tty->ctrl_lock, flags); return ret; }