tty: Wait for SAK work before waiting for hangup work
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 11 Mar 2013 20:44:30 +0000 (16:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:38:58 +0000 (16:38 -0700)
SAK work may schedule hangup work (if TTY_SOFT_SAK is defined), thus
SAK work must be flushed before hangup work.

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

index 77120911e01620f1c1f0c513181d54b74c8d2c7b..37671fcc7e4c0a747a0d6e58051e1dc6794b54ca 100644 (file)
@@ -506,8 +506,8 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
  */
 static void tty_ldisc_flush_works(struct tty_struct *tty)
 {
-       flush_work(&tty->hangup_work);
        flush_work(&tty->SAK_work);
+       flush_work(&tty->hangup_work);
        flush_work(&tty->port->buf.work);
 }