From: tip-bot for Rusty Russell <rusty@rustcorp.com.au>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, anton@samba.org, hpa@zytor.com,
mingo@redhat.com, torvalds@linux-foundation.org,
rusty@rustcorp.com.au, stable@kernel.org, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:sched/core] sched: Fix isolcpus boot option
Date: Wed, 2 Dec 2009 10:45:22 GMT [thread overview]
Message-ID: <tip-bdddd2963c0264c56f18043f6fa829d3c1d3d1c0@git.kernel.org> (raw)
In-Reply-To: <200912021409.17013.rusty@rustcorp.com.au>
Commit-ID: bdddd2963c0264c56f18043f6fa829d3c1d3d1c0
Gitweb: http://git.kernel.org/tip/bdddd2963c0264c56f18043f6fa829d3c1d3d1c0
Author: Rusty Russell <rusty@rustcorp.com.au>
AuthorDate: Wed, 2 Dec 2009 14:09:16 +1030
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 2 Dec 2009 10:27:16 +0100
sched: Fix isolcpus boot option
Anton Blanchard wrote:
> We allocate and zero cpu_isolated_map after the isolcpus
> __setup option has run. This means cpu_isolated_map always
> ends up empty and if CPUMASK_OFFSTACK is enabled we write to a
> cpumask that hasn't been allocated.
I introduced this regression in 49557e620339cb13 (sched: Fix
boot crash by zalloc()ing most of the cpu masks).
Use the bootmem allocator if they set isolcpus=, otherwise
allocate and zero like normal.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: peterz@infradead.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@kernel.org>
LKML-Reference: <200912021409.17013.rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Anton Blanchard <anton@samba.org>
---
kernel/sched.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/sched.c b/kernel/sched.c
index 1031cae..4883fee 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8061,6 +8061,7 @@ static cpumask_var_t cpu_isolated_map;
/* Setup the mask of cpus configured for isolated domains */
static int __init isolated_cpu_setup(char *str)
{
+ alloc_bootmem_cpumask_var(&cpu_isolated_map);
cpulist_parse(str, cpu_isolated_map);
return 1;
}
@@ -9609,7 +9610,9 @@ void __init sched_init(void)
zalloc_cpumask_var(&nohz.cpu_mask, GFP_NOWAIT);
alloc_cpumask_var(&nohz.ilb_grp_nohz_mask, GFP_NOWAIT);
#endif
- zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
+ /* May be allocated at isolcpus cmdline parse time */
+ if (cpu_isolated_map == NULL)
+ zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
#endif /* SMP */
perf_event_init();
prev parent reply other threads:[~2009-12-02 10:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 0:05 [PATCH] " Anton Blanchard
2009-11-30 8:31 ` Peter Zijlstra
2009-12-01 0:44 ` Rusty Russell
2009-12-02 3:39 ` Rusty Russell
2009-12-02 10:45 ` tip-bot for Rusty Russell [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-bdddd2963c0264c56f18043f6fa829d3c1d3d1c0@git.kernel.org \
--to=rusty@rustcorp.com.au \
--cc=anton@samba.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=stable@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome