]> git.karo-electronics.de Git - linux-beck.git/commit
tty: Drop krefs for interrupted tty lock
authorPeter Hurley <peter@hurleysoftware.com>
Fri, 5 Feb 2016 18:49:36 +0000 (10:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 00:56:46 +0000 (16:56 -0800)
commite9036d0662360cd4c79578565ce422ed5872f301
treede3a6332fd92f6a8992440467988f6844bd270c9
parent36f90b0a2ddd60823fe193a85e60ff1906c2a9b3
tty: Drop krefs for interrupted tty lock

When the tty lock is interrupted on attempted re-open, 2 tty krefs
are still held. Drop extra kref before returning failure from
tty_lock_interruptible(), and drop lookup kref before returning
failure from tty_open().

Fixes: 0bfd464d3fdd ("tty: Wait interruptibly for tty lock on reopen")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c
drivers/tty/tty_mutex.c