From: "tip-bot2 for Dietmar Eggemann" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Barry Song <song.bao.hua@hisilicon.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa()
Date: Tue, 02 Feb 2021 10:03:52 -0000 [thread overview]
Message-ID: <161226023248.23325.3813577782629568153.tip-bot2@tip-bot2> (raw)
In-Reply-To: <6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: e972d92d52a1f691498add14feb2ee5902d02404
Gitweb: https://git.kernel.org/tip/e972d92d52a1f691498add14feb2ee5902d02404
Author: Dietmar Eggemann <dietmar.eggemann@arm.com>
AuthorDate: Mon, 01 Feb 2021 10:53:53 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 01 Feb 2021 15:31:39 +01:00
sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa()
Commit "sched/topology: Make sched_init_numa() use a set for the
deduplicating sort" allocates 'i + nr_levels (level)' instead of
'i + nr_levels + 1' sched_domain_topology_level.
This led to an Oops (on Arm64 juno with CONFIG_SCHED_DEBUG):
sched_init_domains
build_sched_domains()
__free_domain_allocs()
__sdt_free() {
...
for_each_sd_topology(tl)
...
sd = *per_cpu_ptr(sdd->sd, j); <--
...
}
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Vincent Guittot <vincent.guittot@linaro.org>
Tested-by: Barry Song <song.bao.hua@hisilicon.com>
Link: https://lkml.kernel.org/r/6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com
---
kernel/sched/topology.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index bf5c9bd..09d3504 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1702,7 +1702,7 @@ void sched_init_numa(void)
/* Compute default topology size */
for (i = 0; sched_domain_topology[i].mask; i++);
- tl = kzalloc((i + nr_levels) *
+ tl = kzalloc((i + nr_levels + 1) *
sizeof(struct sched_domain_topology_level), GFP_KERNEL);
if (!tl)
return;
next prev parent reply other threads:[~2021-02-02 10:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 12:39 [PATCH 0/1] sched/topology: NUMA distance deduplication Valentin Schneider
2021-01-22 12:39 ` [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for the deduplicating sort Valentin Schneider
2021-01-25 2:23 ` Song Bao Hua (Barry Song)
2021-01-25 9:26 ` Valentin Schneider
2021-01-25 16:45 ` Valentin Schneider
2021-01-25 21:35 ` Song Bao Hua (Barry Song)
2021-01-28 14:47 ` Valentin Schneider
2021-01-29 2:02 ` Song Bao Hua (Barry Song)
2021-02-01 12:03 ` Valentin Schneider
2021-02-01 9:53 ` Dietmar Eggemann
2021-02-01 10:19 ` Vincent Guittot
2021-02-01 10:35 ` Song Bao Hua (Barry Song)
2021-02-01 11:55 ` Valentin Schneider
2021-02-02 10:03 ` tip-bot2 for Dietmar Eggemann [this message]
2021-02-17 13:17 ` [tip: sched/core] sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa() tip-bot2 for Dietmar Eggemann
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=161226023248.23325.3813577782629568153.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=song.bao.hua@hisilicon.com \
--cc=vincent.guittot@linaro.org \
--cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).