From: Andi Kleen <ak@muc.de>
To: Andrew Morton <akpm@osdl.org>
Cc: arjanv@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_SLAB_DEBUG and NUMA API
Date: 6 Jul 2004 23:03:31 +0200
Date: Tue, 6 Jul 2004 23:03:31 +0200 [thread overview]
Message-ID: <20040706210331.GA29417@muc.de> (raw)
In-Reply-To: <20040705234945.1f920d1b.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". */
next parent reply other threads:[~2004-07-06 21:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040706063149.GA37299@muc.de>
[not found] ` <20040705234945.1f920d1b.akpm@osdl.org>
2004-07-06 21:03 ` Andi Kleen [this message]
2004-07-07 8:10 ` CONFIG_SLAB_DEBUG and NUMA API R. J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040706210331.GA29417@muc.de \
--to=ak@muc.de \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox