Commit 9975fde0 authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/con3270: return from notifier when activate view fails

When activating the view fails (in this case because the 3270
is disconnected) return from the notifer callback. Otherwise
the system will deadlock.
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent fe5e23dd
......@@ -2079,12 +2079,16 @@ static int con3270_notify(struct notifier_block *self,
{
struct tty3270 *tp;
unsigned long flags;
int rc;
tp = condev;
if (!tp->view.dev)
return NOTIFY_DONE;
if (!raw3270_view_lock_unavailable(&tp->view))
raw3270_activate_view(&tp->view);
if (!raw3270_view_lock_unavailable(&tp->view)) {
rc = raw3270_activate_view(&tp->view);
if (rc)
return NOTIFY_DONE;
}
if (!spin_trylock_irqsave(&tp->view.lock, flags))
return NOTIFY_DONE;
con3270_wait_write(tp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment