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
| ||
|
Date: Tue, 26 Apr 2016 11:17:08 -0700 From: Kamal Mostafa <kamal@...onical.com> To: linux-kernel@...r.kernel.org, stable@...r.kernel.org, kernel-team@...ts.ubuntu.com Cc: Davidlohr Bueso <dbueso@...e.de>, Davidlohr Bueso <dave@...olabs.net>, bigeasy@...utronix.de, dvhart@...radead.org, Thomas Gleixner <tglx@...utronix.de>, Kamal Mostafa <kamal@...onical.com> Subject: [PATCH 4.2.y-ckt 68/93] futex: Acknowledge a new waiter in counter before plist 4.2.8-ckt9 -stable review patch. If anyone has any objections, please let me know. ---8<------------------------------------------------------------ From: Davidlohr Bueso <dave@...olabs.net> commit fe1bce9e2107ba3a8faffe572483b6974201a0e6 upstream. Otherwise an incoming waker on the dest hash bucket can miss the waiter adding itself to the plist during the lockless check optimization (small window but still the correct way of doing this); similarly to the decrement counterpart. Suggested-by: Peter Zijlstra <peterz@...radead.org> Signed-off-by: Davidlohr Bueso <dbueso@...e.de> Cc: Davidlohr Bueso <dave@...olabs.net> Cc: bigeasy@...utronix.de Cc: dvhart@...radead.org Link: http://lkml.kernel.org/r/1461208164-29150-1-git-send-email-dave@stgolabs.net Signed-off-by: Thomas Gleixner <tglx@...utronix.de> Signed-off-by: Kamal Mostafa <kamal@...onical.com> --- kernel/futex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/futex.c b/kernel/futex.c index df4203b2..02113e5 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1395,8 +1395,8 @@ void requeue_futex(struct futex_q *q, struct futex_hash_bucket *hb1, if (likely(&hb1->chain != &hb2->chain)) { plist_del(&q->list, &hb1->chain); hb_waiters_dec(hb1); - plist_add(&q->list, &hb2->chain); hb_waiters_inc(hb2); + plist_add(&q->list, &hb2->chain); q->lock_ptr = &hb2->lock; } get_futex_key_refs(key2); -- 2.7.4
Powered by blists - more mailing lists