diff options
author | Hugh Dickins <hugh@veritas.com> | 2009-02-09 19:20:50 +0000 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-10 00:50:37 +0100 |
commit | acd895795d35d7c6405f20301a846d16998795ec (patch) | |
tree | e1f704ec416e5ef735cadcf40392a2398c319e3f /kernel | |
parent | 4c098bcd55fad34dcf224bf8343db6a9ac58fc68 (diff) | |
download | lwn-acd895795d35d7c6405f20301a846d16998795ec.tar.gz lwn-acd895795d35d7c6405f20301a846d16998795ec.zip |
profiling: fix broken profiling regression
Impact: fix broken /proc/profile on UP machines
Commit c309b917cab55799ea489d7b5f1b77025d9f8462 "cpumask: convert
kernel/profile.c" broke profiling. prof_cpu_mask was previously
initialized to CPU_MASK_ALL, but left uninitialized in that commit.
We need to copy cpu_possible_mask (cpu_online_mask is not enough).
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/profile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index 784933acf5b8..7724e0409bae 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -114,12 +114,15 @@ int __ref profile_init(void) if (!slab_is_available()) { prof_buffer = alloc_bootmem(buffer_bytes); alloc_bootmem_cpumask_var(&prof_cpu_mask); + cpumask_copy(prof_cpu_mask, cpu_possible_mask); return 0; } if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL)) return -ENOMEM; + cpumask_copy(prof_cpu_mask, cpu_possible_mask); + prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL); if (prof_buffer) return 0; |