lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1366038366-8332-1-git-send-email-peter@hurleysoftware.com>
Date:	Mon, 15 Apr 2013 11:06:06 -0400
From:	Peter Hurley <peter@...leysoftware.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Jiri Slaby <jslaby@...e.cz>,
	Vincent Pillet <vincentx.pillet@...el.com>,
	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	Peter Hurley <peter@...leysoftware.com>
Subject: [PATCH tty-next] tty: Fix unsafe bit ops in tty_throttle_safe/unthrottle_safe

tty->flags needs to be atomically modified.

Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
 drivers/tty/tty_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 2febed5..ce67f2c 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -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);
 		}
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ