diff options
author | Xiaotian Feng <dfeng@redhat.com> | 2011-04-22 18:53:54 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-05-28 17:02:54 +0200 |
commit | cd4ae6adf8b1c21d88e83ed56afeeef97b28f356 (patch) | |
tree | 7a0625d20d135deb1e8c142fc13da6b4eaa6ea6c /kernel/sched_stats.h | |
parent | dc7acbb2518f250050179c8581a972df3b6a24f1 (diff) | |
download | op-kernel-dev-cd4ae6adf8b1c21d88e83ed56afeeef97b28f356.zip op-kernel-dev-cd4ae6adf8b1c21d88e83ed56afeeef97b28f356.tar.gz |
sched: More sched_domain iterations fixes
sched_domain iterations needs to be protected by rcu_read_lock() now,
this patch adds another two places which needs the rcu lock, which is
spotted by following suspicious rcu_dereference_check() usage warnings.
kernel/sched_rt.c:1244 invoked rcu_dereference_check() without protection!
kernel/sched_stats.h:41 invoked rcu_dereference_check() without protection!
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1303469634-11678-1-git-send-email-dfeng@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_stats.h')
-rw-r--r-- | kernel/sched_stats.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched_stats.h b/kernel/sched_stats.h index 48ddf43..331e01b 100644 --- a/kernel/sched_stats.h +++ b/kernel/sched_stats.h @@ -37,7 +37,7 @@ static int show_schedstat(struct seq_file *seq, void *v) #ifdef CONFIG_SMP /* domain-specific stats */ - preempt_disable(); + rcu_read_lock(); for_each_domain(cpu, sd) { enum cpu_idle_type itype; @@ -64,7 +64,7 @@ static int show_schedstat(struct seq_file *seq, void *v) sd->ttwu_wake_remote, sd->ttwu_move_affine, sd->ttwu_move_balance); } - preempt_enable(); + rcu_read_unlock(); #endif } kfree(mask_str); |