Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cedce3e7 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Ingo Molnar
Browse files

sched/__wake_up_sync_key(): Fix nr_exclusive tasks which lead to WF_SYNC clearing



Only one task can replace the waker.

Signed-off-by: default avatarKirill Tkhai <tkhai@yandex.ru>
CC: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/512421372963700@web25f.yandex.ru


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 971ee28c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2660,7 +2660,7 @@ void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode,
	if (unlikely(!q))
		return;

	if (unlikely(!nr_exclusive))
	if (unlikely(nr_exclusive != 1))
		wake_flags = 0;

	spin_lock_irqsave(&q->lock, flags);