From: Andrew Morton Date: Sat, 10 Jun 2006 18:59:23 +0000 (+0000) Subject: [PATCH] powernow-k8 crash workaround X-Git-Tag: v2.6.16.28-rc1~30 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb2f2dbc934bd12945074118932907a315f722ea;p=karo-tx-linux.git [PATCH] powernow-k8 crash workaround Work around the oops reported in http://bugzilla.kernel.org/show_bug.cgi?id=6478. Thanks to Ralf Hildebrandt for testing and reporting. Acked-by: Dave Jones Cc: "Brown, Len" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index abbdb37a7f5f..f36db22ce1ae 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -577,6 +577,8 @@ acpi_processor_register_performance(struct acpi_processor_performance return_VALUE(-EBUSY); } + WARN_ON(!performance); + pr->performance = performance; if (acpi_processor_get_performance_info(pr)) { @@ -609,7 +611,8 @@ acpi_processor_unregister_performance(struct acpi_processor_performance return_VOID; } - kfree(pr->performance->states); + if (pr->performance) + kfree(pr->performance->states); pr->performance = NULL; acpi_cpufreq_remove_file(pr);