diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-15 08:08:03 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 11:05:15 (GMT) |
commit | b37d40d1759a383208ef47be8af94ebe59031691 (patch) | |
tree | 32870d4ce58147a4c8ae1e90dc115e9ae79db436 /arch | |
parent | b53bcb6799f8f2c0f385f24a8bb054f142c7d83a (diff) | |
download | linux-fsl-qoriq-b37d40d1759a383208ef47be8af94ebe59031691.tar.xz |
[SPARC64]: Fix leak when DR added cpu does not bootup.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 69a1183..6956845 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c @@ -90,7 +90,6 @@ static volatile unsigned long callin_flag = 0; void __devinit smp_callin(void) { int cpuid = hard_smp_processor_id(); - struct trap_per_cpu *tb = &trap_block[cpuid];; __local_per_cpu_offset = __per_cpu_offset(cpuid); @@ -119,11 +118,6 @@ void __devinit smp_callin(void) atomic_inc(&init_mm.mm_count); current->active_mm = &init_mm; - if (tb->hdesc) { - kfree(tb->hdesc); - tb->hdesc = NULL; - } - while (!cpu_isset(cpuid, smp_commenced_mask)) rmb(); @@ -345,6 +339,7 @@ static struct thread_info *cpu_new_thread = NULL; static int __devinit smp_boot_one_cpu(unsigned int cpu) { + struct trap_per_cpu *tb = &trap_block[cpu]; unsigned long entry = (unsigned long)(&sparc64_cpu_startup); unsigned long cookie = @@ -389,6 +384,11 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu) } cpu_new_thread = NULL; + if (tb->hdesc) { + kfree(tb->hdesc); + tb->hdesc = NULL; + } + return ret; } |