[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131127132243.GD10022@twins.programming.kicks-ass.net>
Date: Wed, 27 Nov 2013 14:22:43 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
svaidy@...ux.vnet.ibm.com, vincent.guittot@...aro.org,
bitbucket@...ine.de, benh@...nel.crashing.org, anton@...ba.org,
Morten.Rasmussen@....com, pjt@...gle.com, mikey@...ling.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [BUG] in sched fair on v3.13-rc1+ doing hotplug
On Wed, Nov 27, 2013 at 08:13:45AM -0500, Steven Rostedt wrote:
> atomic_inc(&sd->groups->sgp->nr_busy_cpus); <<---- BUG
> unlock:
> rcu_read_unlock();
> }
tip/sched/urgent has this one:
---
commit 42eb088ed246a5a817bb45a8b32fe234cf1c0f8b
Author: Peter Zijlstra <peterz@...radead.org>
Date: Tue Nov 19 16:41:49 2013 +0100
sched: Avoid NULL dereference on sd_busy
Commit 37dc6b50cee9 ("sched: Remove unnecessary iteration over sched
domains to update nr_busy_cpus") forgot to clear 'sd_busy' under some
conditions leading to a possible NULL deref in set_cpu_sd_state_idle().
Reported-by: Anton Blanchard <anton@...ba.org>
Cc: Preeti U Murthy <preeti@...ux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20131118113701.GF3866@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@...nel.org>
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c1808606ee5f..a1591ca7eb5a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4910,8 +4910,9 @@ static void update_top_cache_domain(int cpu)
if (sd) {
id = cpumask_first(sched_domain_span(sd));
size = cpumask_weight(sched_domain_span(sd));
- rcu_assign_pointer(per_cpu(sd_busy, cpu), sd->parent);
+ sd = sd->parent; /* sd_busy */
}
+ rcu_assign_pointer(per_cpu(sd_busy, cpu), sd);
rcu_assign_pointer(per_cpu(sd_llc, cpu), sd);
per_cpu(sd_llc_size, cpu) = size;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists