diff options
author | Alan Cox <alan@linux.intel.com> | 2010-02-08 10:09:26 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 14:43:22 -0800 |
commit | 638b9648ab51c9c549ff5735d3de519ef6199df3 (patch) | |
tree | 08b617792ac4a06339d4264706af44a49c8dd555 /drivers/char/serial167.c | |
parent | 97c22394bb5dc89683ac150f1003d47e6e9418d9 (diff) | |
download | kernel_samsung_smdk4412-638b9648ab51c9c549ff5735d3de519ef6199df3.zip kernel_samsung_smdk4412-638b9648ab51c9c549ff5735d3de519ef6199df3.tar.gz kernel_samsung_smdk4412-638b9648ab51c9c549ff5735d3de519ef6199df3.tar.bz2 |
tty: Fix the ldisc hangup race
This was noticed by Matthias Urlichs and he proposed a fix. This patch
does the fixing a different way to avoid introducing several new race
conditions into the code.
The problem case is TTY_DRIVER_RESET_TERMIOS = 0. In that case while we
abort the ldisc change, the hangup processing has not cleaned up and restarted
the ldisc either.
We can't restart the ldisc stuff in the set_ldisc as we don't know what
the hangup did and may touch stuff we shouldn't as we are no longer
supposed to influence the tty at that point in case it has been re-opened
before we get rescheduled.
Instead do it the simple way. Always re-init the ldisc on the hangup, but
use TTY_DRIVER_RESET_TERMIOS to indicate that we should force N_TTY.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/serial167.c')
0 files changed, 0 insertions, 0 deletions