From: Martin Schwidefsky In case of a non 3270 tty the mutex won't get freed. Signed-off-by: Martin Schwidefsky Cc: Peter Zijlstra Cc: Alan Cox Signed-off-by: Andrew Morton --- drivers/s390/char/fs3270.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/s390/char/fs3270.c~tty-signal-tty-locking-3270-fix drivers/s390/char/fs3270.c --- a/drivers/s390/char/fs3270.c~tty-signal-tty-locking-3270-fix +++ a/drivers/s390/char/fs3270.c @@ -427,10 +427,10 @@ fs3270_open(struct inode *inode, struct struct tty_struct *tty; mutex_lock(&tty_mutex); tty = get_current_tty(); - if (!tty) - return -ENODEV; - if (tty->driver->major != IBM_TTY3270_MAJOR) + if (!tty || tty->driver->major != IBM_TTY3270_MAJOR) { + mutex_unlock(&tty_mutex); return -ENODEV; + } minor = tty->index + RAW3270_FIRSTMINOR; mutex_unlock(&tty_mutex); } _