From: tip-bot for Vincent Guittot <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
jet.chen@intel.com, peterz@infradead.org,
vincent.guittot@linaro.org, tglx@linutronix.de
Subject: [tip:sched/core] sched/numa: Fix initialization of sched_domain_topology for NUMA
Date: Thu, 22 May 2014 05:27:24 -0700 [thread overview]
Message-ID: <tip-c515db8cd311ef77b2dc7cbd6b695022655bb0f3@git.kernel.org> (raw)
In-Reply-To: <1399972261-25693-1-git-send-email-vincent.guittot@linaro.org>
Commit-ID: c515db8cd311ef77b2dc7cbd6b695022655bb0f3
Gitweb: http://git.kernel.org/tip/c515db8cd311ef77b2dc7cbd6b695022655bb0f3
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Tue, 13 May 2014 11:11:01 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 22 May 2014 11:16:29 +0200
sched/numa: Fix initialization of sched_domain_topology for NUMA
Jet Chen has reported a kernel panics when booting qemu-system-x86_64 with
kvm64 cpu. A panic occured while building the sched_domain.
In sched_init_numa, we create a new topology table in which both default
levels and numa levels are copied. The last row of the table must have a null
pointer in the mask field.
The current implementation doesn't add this last row in the computation of the
table size. So we add 1 row in the allocation size that will be used as the
last row of the table. The kzalloc will ensure that the mask field is NULL.
Reported-by: Jet Chen <jet.chen@intel.com>
Tested-by: Jet Chen <jet.chen@intel.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: fengguang.wu@intel.com
Link: http://lkml.kernel.org/r/1399972261-25693-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a78c5b6..45d077e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6231,7 +6231,7 @@ static void sched_init_numa(void)
/* Compute default topology size */
for (i = 0; sched_domain_topology[i].mask; i++);
- tl = kzalloc((i + level) *
+ tl = kzalloc((i + level + 1) *
sizeof(struct sched_domain_topology_level), GFP_KERNEL);
if (!tl)
return;
prev parent reply other threads:[~2014-05-22 12:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 21:16 sched: fix: initialization of sched_domain_topology for NUMA Vincent Guittot
2014-05-13 8:26 ` Peter Zijlstra
2014-05-13 8:33 ` Vincent Guittot
2014-05-13 9:11 ` Vincent Guittot
2014-05-13 10:15 ` Peter Zijlstra
2014-05-19 13:09 ` [tip:sched/core] sched: Fix " tip-bot for Vincent Guittot
2014-05-22 12:27 ` tip-bot for Vincent Guittot [this message]
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=tip-c515db8cd311ef77b2dc7cbd6b695022655bb0f3@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=jet.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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