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>] [day] [month] [year] [list]
Date:	Wed, 28 Apr 2010 11:43:08 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Andreas Herrmann <andreas.herrmann3@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Galbraith <efault@....de>, linux-kernel@...r.kernel.org,
	Changli Gao <xiaosuo@...il.com>
Subject: [PATCH] sched: use wrapper functions

use wrapper functions.

Since there are add_wait_queue_exclusive_locked() and remove_wait_queue_locked()
, we'd better use them instead.

Signed-off-by: Changli Gao <xiaosuo@...il.com>
----
 kernel/sched.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 6af210a..be5ab70 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4039,8 +4039,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
 	if (!x->done) {
 		DECLARE_WAITQUEUE(wait, current);
 
-		wait.flags |= WQ_FLAG_EXCLUSIVE;
-		__add_wait_queue_tail(&x->wait, &wait);
+		add_wait_queue_exclusive_locked(&x->wait, &wait);
 		do {
 			if (signal_pending_state(state, current)) {
 				timeout = -ERESTARTSYS;
@@ -4051,7 +4050,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
 			timeout = schedule_timeout(timeout);
 			spin_lock_irq(&x->wait.lock);
 		} while (!x->done && timeout);
-		__remove_wait_queue(&x->wait, &wait);
+		remove_wait_queue_locked(&x->wait, &wait);
 		if (!x->done)
 			return timeout;
 	}
--
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