From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Preeti U Murthy <preeti@linux.vnet.ibm.com>,
svaidy@linux.vnet.ibm.com, vincent.guittot@linaro.org,
bitbucket@online.de, benh@kernel.crashing.org, anton@samba.org,
Morten.Rasmussen@arm.com, pjt@google.com, mikey@neuling.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [BUG] in sched fair on v3.13-rc1+ doing hotplug
Date: Wed, 27 Nov 2013 14:22:43 +0100 [thread overview]
Message-ID: <20131127132243.GD10022@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20131127081345.0cab8b15@gandalf.local.home>
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@infradead.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@samba.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20131118113701.GF3866@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.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;
next prev parent reply other threads:[~2013-11-27 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 13:13 [BUG] in sched fair on v3.13-rc1+ doing hotplug Steven Rostedt
2013-11-27 13:22 ` Peter Zijlstra [this message]
2013-11-27 14:08 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131127132243.GD10022@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Morten.Rasmussen@arm.com \
--cc=anton@samba.org \
--cc=benh@kernel.crashing.org \
--cc=bitbucket@online.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mikey@neuling.org \
--cc=mingo@kernel.org \
--cc=pjt@google.com \
--cc=preeti@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=svaidy@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox