[PATCH][[email protected]: Re: 2.5.39-bk crashes here when P4 clock modulation enabled]
PATCH 1/1 [PATCH][[email protected]: Re: 2.5.39-bk crashes here when P4 clock modulation enabled]
Hi Linus, Alan,
In two drivers a wrong size of memory was allocated for cpufreq_driver: as it must include NR_CPUS times a struct cpufreq_policy (and not struct cpufreq_freqs). Thanks to Petr Vandrovec for this patch.
Dominik
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c +1 -1
@@ -221,7 +221,7 @@ printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); driver =kmalloc (sizeof (struct cpufreq_driver ) + -NR_CPUS *sizeof (struct cpufreq_freqs ),GFP_KERNEL ); +NR_CPUS *sizeof (struct cpufreq_policy ),GFP_KERNEL );if (!driver)return -ENOMEM ;
arch/i386/kernel/cpu/cpufreq/powernow-k6.c +1 -1
@@ -234,7 +234,7 @@/* initialization of main "cpufreq" code*/ driver =kmalloc (sizeof (struct cpufreq_driver ) + -NR_CPUS *sizeof (struct cpufreq_freqs ),GFP_KERNEL ); +NR_CPUS *sizeof (struct cpufreq_policy ),GFP_KERNEL );if (!driver) {release_region (POWERNOW_IOPORT ,16 );return -ENOMEM ;