diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 126a302c481c..852ae8c66502 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -1999,8 +1999,7 @@ static int alloc_callchain_buffers(void) | |||
1999 | * accessed from NMI. Use a temporary manual per cpu allocation | 1999 | * accessed from NMI. Use a temporary manual per cpu allocation |
2000 | * until that gets sorted out. | 2000 | * until that gets sorted out. |
2001 | */ | 2001 | */ |
2002 | size = sizeof(*entries) + sizeof(struct perf_callchain_entry *) * | 2002 | size = offsetof(struct callchain_cpus_entries, cpu_entries[nr_cpu_ids]); |
2003 | num_possible_cpus(); | ||
2004 | 2003 | ||
2005 | entries = kzalloc(size, GFP_KERNEL); | 2004 | entries = kzalloc(size, GFP_KERNEL); |
2006 | if (!entries) | 2005 | if (!entries) |