aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2009-09-19 14:55:44 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-20 14:00:32 -0400
commit89f19f04dc72363d912fd007a399cb10310eff6e (patch)
treedaa64e5de98a668eed4a2ceeb6ca95c478be4053 /include
parent3f04e8cd5b24727a2500f8ab8f3de730ba47b02c (diff)
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: Andrew Morton <akpm@linux-foundation.org> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <200909191855.n8JItiko022148@imap1.linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8af3d249170e..cc37a3fa5065 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -257,7 +257,7 @@ extern asmlinkage void schedule_tail(struct task_struct *prev);
257extern void init_idle(struct task_struct *idle, int cpu); 257extern void init_idle(struct task_struct *idle, int cpu);
258extern void init_idle_bootup_task(struct task_struct *idle); 258extern void init_idle_bootup_task(struct task_struct *idle);
259 259
260extern int runqueue_is_locked(void); 260extern int runqueue_is_locked(int cpu);
261extern void task_rq_unlock_wait(struct task_struct *p); 261extern void task_rq_unlock_wait(struct task_struct *p);
262 262
263extern cpumask_var_t nohz_cpu_mask; 263extern cpumask_var_t nohz_cpu_mask;