]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Halt both ldiscs concurrently
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Mar 2013 20:44:29 +0000 (16:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:38:58 +0000 (16:38 -0700)
commit0a0909e8b4f7e4e6b3eec358edd8f83998220bc7
tree58141b5d68fee0e635954f9a3c1fe0e500e627ba
parent14ebc9edae263bd0674eaf4d4882f1aa55d57098
tty: Halt both ldiscs concurrently

The pty driver does not obtain an ldisc reference to the linked
tty when writing. When the ldiscs are sequentially halted, it
is possible for one ldisc to be halted, and before the second
ldisc can be halted, a concurrent write schedules buffer work on
the first ldisc. This can lead to an access-after-free error when
the scheduled buffer work starts on the closed ldisc.

Prevent subsequent use after halt by performing each stage
of the halt on both ttys.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_ldisc.c