Re: Preempt on PowerPC/SMP appears to leak memory

Marc-Christian Petersen
2003-04-13T22:52:36Z

On Sunday 13 April 2003 23:57, Robert Love wrote:

Hi Robert,

> http://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/preem
>pt-kernel-rml-2.4.20-2.patch
> It has a couple fixes for proper protection of per-CPU data, including
> some PPC-specific ones.
one thing in it seems bogus:

diff -Naurp preempt-1/kernel/exit.c preempt-2/kernel/exit.c
--- preempt-1/kernel/exit.c 2003-04-14 00:31:39 +0200
+++ preempt-2/kernel/exit.c 2003-04-14 00:31:48 +0200
@@ -282,7 +282,9 @@ struct mm_struct * start_lazy_tlb(void)
current->mm = NULL;
/* active_mm is still 'mm' */
atomic_inc(&mm->mm_count);
+ preempt_disable();
enter_lazy_tlb(mm, current, smp_processor_id());
+ preempt_disable();
return mm;
}

This is an incremental diff snipplet. The second preempt_disable(); should be
a preempt_enable(); no?

ciao, Marc