Re: CONFIG_SLAB_DEBUG and NUMA API

From: Andi Kleen (ak_at_muc.de)
Date: 07/06/04

  • Next message: Jonathan Sambrook: "Re: 2.6 series kernels on HP Netserver LH4 - kernel panic on boot"
    Date:	6 Jul 2004 23:03:31 +0200
    Date:	Tue, 6 Jul 2004 23:03:31 +0200
    To: Andrew Morton <akpm@osdl.org>
    
    

    On Mon, Jul 05, 2004 at 11:49:45PM -0700, Andrew Morton wrote:
    > Andi Kleen <ak@muc.de> wrote:
    > >
    > >
    > > I tested 2.6.7-mm6 with NUMA on with CONFIG_SLAB_DEBUG and I didn't see any
    > > oopses. Do you have a recipe to reproduce them?
    > >
    >
    > Still happens here. Booting SLES9.1 with the attached config.

    [...]

    Here's a patch. The problem was that the kernel exit would allocate
    memory to send exit signals after the local mempolicy was already freed,
    but not zeroed. When the allocator tried to grab more memory it would
    fall over.

    -Andi

    -------------------------------------------------------------

    Move the memory policy freeing to later in exit to make sure
    the last memory allocations don't use an uninitialized policy

    diff -u linux-2.6.7-mm6/kernel/exit.c-o linux-2.6.7-mm6/kernel/exit.c
    --- linux-2.6.7-mm6/kernel/exit.c-o 2004-07-06 05:59:39.000000000 +0200
    +++ linux-2.6.7-mm6/kernel/exit.c 2004-07-06 22:58:39.000000000 +0200
    @@ -828,9 +828,6 @@
             __exit_fs(tsk);
             exit_namespace(tsk);
             exit_thread();
    -#ifdef CONFIG_NUMA
    - mpol_free(tsk->mempolicy);
    -#endif
     
             if (tsk->signal->leader)
                     disassociate_ctty(1);
    @@ -841,6 +838,10 @@
     
             tsk->exit_code = code;
             exit_notify(tsk);
    +#ifdef CONFIG_NUMA
    + mpol_free(tsk->mempolicy);
    + tsk->mempolicy = NULL;
    +#endif
             schedule();
             BUG();
             /* Avoid "noreturn function does return". */
    -
    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/


  • Next message: Jonathan Sambrook: "Re: 2.6 series kernels on HP Netserver LH4 - kernel panic on boot"