aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-29 15:47:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-29 15:47:40 +0100
commit0eae4686a128d87503863a261e84887750c8bc68 (patch)
tree54a82e36439c0aca8e6a4389c5ea683b2887b1ab /drivers/tty/tty_io.c
parentvirtio_console: initialize vtermno value for ports (diff)
downloadlinux-dev-0eae4686a128d87503863a261e84887750c8bc68.tar.xz
linux-dev-0eae4686a128d87503863a261e84887750c8bc68.zip
Revert "tty: pty: Fix race condition between release_one_tty and pty_write"
This reverts commit b9ca5f8560af244489b4a1bc1ae88b341f24bc95 as 0-day shows it has a circular locking dependency. Fixes: b9ca5f8560af ("tty: pty: Fix race condition between release_one_tty and pty_write") Reported-by: kernel test robot <lkp@intel.com> Cc: Sahara <keun-o.park@darkmatter.ae> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index c27777f3b8c4..5fa250157025 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1448,13 +1448,10 @@ static void release_one_tty(struct work_struct *work)
struct tty_driver *driver = tty->driver;
struct module *owner = driver->owner;
- mutex_lock(&tty_mutex);
if (tty->ops->cleanup)
tty->ops->cleanup(tty);
tty->magic = 0;
- mutex_unlock(&tty_mutex);
-
tty_driver_kref_put(driver);
module_put(owner);