summaryrefslogtreecommitdiff
path: root/drivers/s390/char/con3270.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2022-12-07 22:18:38 +0100
committerHeiko Carstens <hca@linux.ibm.com>2023-01-09 14:34:06 +0100
commit9975fde09e50b9ac9bab49cafac4ebc32cf4044c (patch)
tree8cb2f9b87d560245fbb317576cb003ffbb815e4c /drivers/s390/char/con3270.c
parentfe5e23dd983cc3e676f2f9355796e2505d889ce4 (diff)
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: Sven Schnelle <svens@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/char/con3270.c')
-rw-r--r--drivers/s390/char/con3270.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
index 7d163516ee45..5fa1f080d5f3 100644
--- a/drivers/s390/char/con3270.c
+++ b/drivers/s390/char/con3270.c
@@ -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);