|
@@ -1999,8 +1999,7 @@ static int alloc_callchain_buffers(void)
|
|
* accessed from NMI. Use a temporary manual per cpu allocation
|
|
* accessed from NMI. Use a temporary manual per cpu allocation
|
|
* until that gets sorted out.
|
|
* 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);
|
|
entries = kzalloc(size, GFP_KERNEL);
|
|
if (!entries)
|
|
if (!entries)
|