From: Benjamin Herrenschmidt Date: Thu, 6 Aug 2009 11:16:44 +0000 (+1000) Subject: perf_counter/powerpc: Check oprofile_cpu_type for NULL before using it X-Git-Tag: v2.6.31-rc6~44^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0d82a0a4e9841b787e6431ccfbb515546c55dc2;p=pandora-kernel.git perf_counter/powerpc: Check oprofile_cpu_type for NULL before using it If the current CPU doesn't support performance counters, cur_cpu_spec->oprofile_cpu_type can be NULL. The current perf_counter modules don't test for that case and would thus crash at boot time. Bug reported by David Woodhouse. Reported-by: David Woodhouse Signed-off-by: Benjamin Herrenschmidt Cc: Peter Zijlstra Signed-off-by: Paul Mackerras LKML-Reference: <19066.48028.446975.501454@cargo.ozlabs.ibm.com> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed