Skip to content
Commit 89f19f04 authored by Andrew Morton's avatar Andrew Morton Committed by Ingo Molnar
Browse files

sched: Fix raciness in runqueue_is_locked()



runqueue_is_locked() is unavoidably racy due to a poor interface design.
It does

	cpu = get_cpu()
	ret = some_perpcu_thing(cpu);
	put_cpu(cpu);
	return ret;

Its return value is unreliable.

Fix.

Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <200909191855.n8JItiko022148@imap1.linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3f04e8cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment