From: Thomas Renninger Date: Mon, 14 Dec 2009 10:44:15 +0000 (+0100) Subject: [CPUFREQ] Fix use after free of struct powernow_k8_data X-Git-Tag: v2.6.33-rc8~39^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=557a701c16553b0b691dbb64ef30361115a80f64;p=pandora-kernel.git [CPUFREQ] Fix use after free of struct powernow_k8_data Easy fix for a regression introduced in 2.6.31. On managed CPUs the cpufreq.c core will call driver->exit(cpu) on the managed cpus and powernow_k8 will free the core's data. Later driver->get(cpu) function might get called trying to read out the current freq of a managed cpu and the NULL pointer check does not work on the freed object -> better set it to NULL. ->get() is unsigned and must return 0 as invalid frequency. Reference: http://bugzilla.kernel.org/show_bug.cgi?id=14391 Signed-off-by: Thomas Renninger Tested-by: Michal Schmidt CC: stable@kernel.org Signed-off-by: Dave Jones --- Reading git-diff-tree failed