tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 15 Apr 2013 15:06:06 +0000 (11:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Apr 2013 18:08:12 +0000 (11:08 -0700)
tty->flags needs to be atomically modified.

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

index d119034877decb4402c1f2bad5b87e896a20943e..3500d41141472394f364b51952f599f31990bd19 100644 (file)
@@ -156,7 +156,7 @@ int tty_throttle_safe(struct tty_struct *tty)
                if (tty->flow_change != TTY_THROTTLE_SAFE)
                        ret = 1;
                else {
-                       __set_bit(TTY_THROTTLED, &tty->flags);
+                       set_bit(TTY_THROTTLED, &tty->flags);
                        if (tty->ops->throttle)
                                tty->ops->throttle(tty);
                }
@@ -187,7 +187,7 @@ int tty_unthrottle_safe(struct tty_struct *tty)
                if (tty->flow_change != TTY_UNTHROTTLE_SAFE)
                        ret = 1;
                else {
-                       __clear_bit(TTY_THROTTLED, &tty->flags);
+                       clear_bit(TTY_THROTTLED, &tty->flags);
                        if (tty->ops->unthrottle)
                                tty->ops->unthrottle(tty);
                }