diff options
author | Paul Mackerras <[email protected]> | 2009-08-07 16:59:45 +1000 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2009-08-09 12:54:37 +0200 |
commit | f36a1a133a947973efb8e6a1fbdcc23e4a011437 (patch) | |
tree | c635e0a3a8329aac348c2e861f91347abe59792f /net/lapb/lapb_iface.c | |
parent | b26bc5a7f81474937e427b0c855eabee5ad56f89 (diff) |
perf_counter/powerpc: Fix oops on cpus without perf_counter hardware support
If we have the powerpc perf_counter backend compiled in, but
the cpu we are running on is one where we don't support the
PMU, we currently oops in hw_perf_group_sched_in if we try to
use any counters, because ppmu is NULL in that case, and we
unconditionally dereference ppmu.
This fixes the problem by adding a check if ppmu is NULL at the
beginning of hw_perf_group_sched_in, and also at the beginning
of the other functions that get called from the perf_counter
core, i.e. hw_perf_disable, hw_perf_enable, and
hw_perf_counter_setup.
Signed-off-by: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions