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-next>] [day] [month] [year] [list]
Message-Id: <1424712667-11849-1-git-send-email-fabf@skynet.be>
Date:	Mon, 23 Feb 2015 18:31:07 +0100
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel@...r.kernel.org
Cc:	davem@...emloft.net, Peter Zijlstra <peterz@...radead.org>,
	Fabian Frederick <fabf@...net.be>, netdev@...r.kernel.org
Subject: [PATCH 1/1 net-next] net/atm/signaling.c: replace current->state by  __set_current_state()

Use helper functions to access current->state.
Direct assignments are prone to races and therefore buggy.

Thanks to Peter Zijlstra for the exact definition of the problem.

Suggested-By: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 net/atm/signaling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index 523bce7..0140832 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -40,7 +40,7 @@ static void sigd_put_skb(struct sk_buff *skb)
 		pr_debug("atmsvc: waiting for signaling daemon...\n");
 		schedule();
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&sigd_sleep, &wait);
 #else
 	if (!sigd) {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ