• Cyrill Gorcunov's avatar
    x86, perf: Fix NULL deref on not assigned x86_pmu · 0b861225
    Cyrill Gorcunov authored
    In case of not assigned x86_pmu and software events NULL dereference may
    being hit via x86_pmu::schedule_events method.
    
    Fix it by checking if x86_pmu is initialized at all.
    Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
    Cc: Lin Ming <ming.m.lin@intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Robert Richter <robert.richter@amd.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    LKML-Reference: <20100311215016.GG25162@lenovo>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    0b861225
perf_event.c 36.8 KB