• Eric Dumazet's avatar
    perf: Fix alloc_callchain_buffers() · 88d4f0db
    Eric Dumazet authored
    Commit 927c7a9e ("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: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: David Miller <davem@davemloft.net>
    Cc: Stephane Eranian <eranian@google.com>
    CC: stable@kernel.org
    LKML-Reference: <1295980851.3588.351.camel@edumazet-laptop>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    88d4f0db
perf_event.c 152 KB