Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=45c876bf12b431afa9c438b24bd6f55f3a815805
Commit:     45c876bf12b431afa9c438b24bd6f55f3a815805
Parent:     7f8e00f2b9797ce7235634431d65269d21ef80d2
Author:     Fenghua Yu <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 31 00:37:26 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 15:39:36 2007 -0700

    Fix uninitialized local variable "covered" in i386 acpi-cpufreq driver
    
    The local variable "covered" is used without initialization in i386
    acpi-cpufreq driver.  The initial value of covered should be 0.  The bug
    will cause memory leak when hit.  The following patch fixes this bug.
    
    Signed-off-by: Fenghua Yu <[EMAIL PROTECTED]>
    Cc: Venkatesh Pallipadi <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 
b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 6f846be..32d04b0 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -511,7 +511,6 @@ acpi_cpufreq_guess_freq(struct acpi_cpufreq_data *data, 
unsigned int cpu)
 static int acpi_cpufreq_early_init(void)
 {
        struct acpi_processor_performance *data;
-       cpumask_t covered;
        unsigned int i, j;
 
        dprintk("acpi_cpufreq_early_init\n");
@@ -520,14 +519,13 @@ static int acpi_cpufreq_early_init(void)
                data = kzalloc(sizeof(struct acpi_processor_performance),
                               GFP_KERNEL);
                if (!data) {
-                       for_each_cpu_mask(j, covered) {
+                       for_each_possible_cpu(j) {
                                kfree(acpi_perf_data[j]);
                                acpi_perf_data[j] = NULL;
                        }
                        return -ENOMEM;
                }
                acpi_perf_data[i] = data;
-               cpu_set(i, covered);
        }
 
        /* Do initialization in ACPI core */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to