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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170129151531.GA2444@linux-80c1.suse>
Date:   Sun, 29 Jan 2017 07:15:31 -0800
From:   Davidlohr Bueso <dave@...olabs.net>
To:     hpa@...or.com, akpm@...ux-foundation.org,
        linux-kernel@...r.kernel.org, tglx@...utronix.de,
        paulmck@...ux.vnet.ibm.com, longman@...hat.com, mingo@...nel.org,
        peterz@...radead.org, torvalds@...ux-foundation.org
Cc:     linux-tip-commits@...r.kernel.org
Subject: [PATCH -tip] sched/wake_q: Clarify queue reinit

As of bcc9a76d5ac (locking/rwsem: Reinit wake_q after use), the
comment regarding the list reinitialization no longer applies,
update it with the new wake_q_init() helper.

Signed-off-by: Davidlohr Bueso <dbueso@...e.de>
---
 include/linux/sched.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3640bde9f982..c0bc626c531f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -998,8 +998,8 @@ enum cpu_idle_type {
  *
  * The DEFINE_WAKE_Q macro declares and initializes the list head.
  * wake_up_q() does NOT reinitialize the list; it's expected to be
- * called near the end of a function, where the fact that the queue is
- * not used again will be easy to see by inspection.
+ * called near the end of a function. Otherwise, the list can be
+ * re-initialized for later re-use by wake_q_init().
  *
  * Note that this can cause spurious wakeups. schedule() callers
  * must ensure the call is done inside a loop, confirming that the
-- 
2.6.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ