Commit 579a00a5c2f0a85fb4602a53e2c1beb77a646528

Authored by Peter Hurley
Committed by Greg Kroah-Hartman
1 parent 31815c08fc

tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe

tty->flags needs to be atomically modified.

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

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/tty/tty_ioctl.c
... ... @@ -156,7 +156,7 @@
156 156 if (tty->flow_change != TTY_THROTTLE_SAFE)
157 157 ret = 1;
158 158 else {
159   - __set_bit(TTY_THROTTLED, &tty->flags);
  159 + set_bit(TTY_THROTTLED, &tty->flags);
160 160 if (tty->ops->throttle)
161 161 tty->ops->throttle(tty);
162 162 }
... ... @@ -187,7 +187,7 @@
187 187 if (tty->flow_change != TTY_UNTHROTTLE_SAFE)
188 188 ret = 1;
189 189 else {
190   - __clear_bit(TTY_THROTTLED, &tty->flags);
  190 + clear_bit(TTY_THROTTLED, &tty->flags);
191 191 if (tty->ops->unthrottle)
192 192 tty->ops->unthrottle(tty);
193 193 }