From: Peter Hurley Date: Sat, 27 Jun 2015 13:21:32 +0000 (-0400) Subject: n_tty: signal and flush atomically X-Git-Tag: omap-for-v4.3/fixes-merge-window~185^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b19e032295647b7be2aa3be62510db4aaeda759;p=pandora-kernel.git n_tty: signal and flush atomically When handling signalling char, claim the termios write lock before signalling waiting readers and writers to prevent further i/o before flushing the echo and output buffers. This prevents a userspace signal handler which may output from racing the terminal flush. Reference: Bugzilla #99351 ("Output truncated in ssh session after...") Fixes: commit d2b6f44779d3 ("n_tty: Fix signal handling flushes") Reported-by: Filipe Brandenburger Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed