]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: tty: Fix use-after-free in pty_common_install
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Sat, 12 Jul 2014 23:44:00 +0000 (01:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jul 2014 00:21:47 +0000 (17:21 -0700)
commitb91a03ccd2fc56924b6902e0bd6fc175c0135564
treee9d1e2f4570ff89f9ae770c4df9e541e569533c7
parent5757503f69615a9436826404a53e6d686f06eb9f
drivers: tty: Fix use-after-free in pty_common_install

In 5757503f "drivers: tty: Merge alloc_tty_struct and
initialize_tty_struct", I messed up the refactorization of
pty_common_install, causing use-after-free and NULL pointer derefs on
various error paths. This should fix it.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c