X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fchar%2Fip2%2Fip2main.c;h=07f3ea38b5828eda0a16ceed8b23fdbdee891d79;hb=17134d96735115644cc2f0e2b1bab51ca6e3ab95;hp=911e1da6def225af3163809bd2eeaec394931ab4;hpb=334656f33c43921cf383dfd0220dfd34376bcd98;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 911e1da6def2..07f3ea38b582 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -1486,7 +1486,9 @@ ip2_open( PTTY tty, struct file *pFile ) if ( tty_hung_up_p(pFile) || ( pCh->flags & ASYNC_CLOSING )) { if ( pCh->flags & ASYNC_CLOSING ) { + tty_unlock(); schedule(); + tty_lock(); } if ( tty_hung_up_p(pFile) ) { set_current_state( TASK_RUNNING ); @@ -1548,7 +1550,9 @@ ip2_open( PTTY tty, struct file *pFile ) rc = (( pCh->flags & ASYNC_HUP_NOTIFY ) ? -EAGAIN : -ERESTARTSYS); break; } + tty_unlock(); schedule(); + tty_lock(); } set_current_state( TASK_RUNNING ); remove_wait_queue(&pCh->open_wait, &wait);