diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-11-16 04:28:09 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-16 04:46:27 -0500 |
commit | 047106adcc85e3023da210143a6ab8a55df9e0fc (patch) | |
tree | dd92c3c65229622bed4b27c60f7d617c9dbf1a2a /kernel | |
parent | 498657a478c60be092208422fefa9c7b248729c2 (diff) |
sched: Sched_rt_periodic_timer vs cpu hotplug
Heiko reported a case where a timer interrupt managed to
reference a root_domain structure that was already freed by a
concurrent hot-un-plug operation.
Solve this like the regular sched_domain stuff is also
synchronized, by adding a synchronize_sched() stmt to the free
path, this ensures that a root_domain stays present for any
atomic section that could have observed it.
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gregory Haskins <ghaskins@novell.com>
Cc: Siddha Suresh B <suresh.b.siddha@intel.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
LKML-Reference: <1258363873.26714.83.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index cea2beac7909..3c91f110fc62 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -7912,6 +7912,8 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) | |||
7912 | 7912 | ||
7913 | static void free_rootdomain(struct root_domain *rd) | 7913 | static void free_rootdomain(struct root_domain *rd) |
7914 | { | 7914 | { |
7915 | synchronize_sched(); | ||
7916 | |||
7915 | cpupri_cleanup(&rd->cpupri); | 7917 | cpupri_cleanup(&rd->cpupri); |
7916 | 7918 | ||
7917 | free_cpumask_var(rd->rto_mask); | 7919 | free_cpumask_var(rd->rto_mask); |