Re: [PATCH] perf_counter/powerpc: Check oprofile_cpu_type for NULLbefore using it

From: Ingo Molnar
Date: Thu Aug 06 2009 - 07:56:10 EST



* Paul Mackerras <paulus@xxxxxxxxx> wrote:

> From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
>
> 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.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Reported-by: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
> Signed-off-by: Paul Mackerras <paulus@xxxxxxxxx>
> ---
> Ingo, this needs to go in for .31 since it fixes a boot-time oops.
> Are you going to be sending a batch to Linus shortly or should I send
> this to him separately?

Yeah, wanted to send a batch of fixes later today - so i've queued
this one up too in perfcounters/urgent.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/