Re: Preempt on PowerPC/SMP appears to leak memory

From: Marc-Christian Petersen (m.c.p@wolk-project.de)
Date: Sun Apr 13 2003 - 18:03:26 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:29 EST