| From | Greg Kroah-Hartman <> | Subject | [ 19/57] tty: Fix SIGTTOU not sent with tcflush() | Date | Wed, 2 Oct 2013 21:08:45 -0700 |
| |
3.11-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Hurley <peter@hurleysoftware.com>
commit 5cec7bf699c61d14f0538345076480bb8c8ebfbb upstream.
Commit 'e7f3880cd9b98c5bf9391ae7acdec82b75403776' tty: Fix recursive deadlock in tty_perform_flush() introduced a regression where tcflush() does not generate SIGTTOU for background process groups.
Make sure ioctl(TCFLSH) calls tty_check_change() when invoked from the line discipline.
Reported-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- drivers/tty/tty_ioctl.c | 3 +++ 1 file changed, 3 insertions(+)
--- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c @@ -1201,6 +1201,9 @@ int n_tty_ioctl_helper(struct tty_struct } return 0; case TCFLSH: + retval = tty_check_change(tty); + if (retval) + return retval; return __tty_perform_flush(tty, arg); default: /* Try the mode commands */
|