This is a note to let you know that I've just added the patch titled
perf: Fix alloc_callchain_buffers()
to the 2.6.37-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
perf-fix-alloc_callchain_buffers.patch
and it can be found in the queue-2.6.37 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 88d4f0db7fa8785859c1d637f9aac210932b6216 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Tue, 25 Jan 2011 19:40:51 +0100
Subject: perf: Fix alloc_callchain_buffers()
From: Eric Dumazet <[email protected]>
commit 88d4f0db7fa8785859c1d637f9aac210932b6216 upstream.
Commit 927c7a9e92c4 ("perf: Fix race in callchains") introduced
a mismatch in the sizing of struct callchain_cpus_entries.
nr_cpu_ids must be used instead of num_possible_cpus(), or we
might get out of bound memory accesses on some machines.
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Miller <[email protected]>
Cc: Stephane Eranian <[email protected]>
LKML-Reference: <1295980851.3588.351.camel@edumazet-laptop>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
kernel/perf_event.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1872,8 +1872,7 @@ static int alloc_callchain_buffers(void)
* accessed from NMI. Use a temporary manual per cpu allocation
* until that gets sorted out.
*/
- size = sizeof(*entries) + sizeof(struct perf_callchain_entry *) *
- num_possible_cpus();
+ size = offsetof(struct callchain_cpus_entries, cpu_entries[nr_cpu_ids]);
entries = kzalloc(size, GFP_KERNEL);
if (!entries)
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.37/net_sched-pfifo_head_drop-problem.patch
queue-2.6.37/net-add-pollpri-to-sock_def_readable.patch
queue-2.6.37/epoll-epoll_wait-should-not-use-timespec_add_ns.patch
queue-2.6.37/net-fix-ip-link-add-netns-oops.patch
queue-2.6.37/perf-fix-alloc_callchain_buffers.patch
queue-2.6.37/ipv4-ip-defragmentation-must-be-ecn-aware.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable