From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Andrew Morton <akpm@osdl.org>
Cc: matthias.andree@gmx.de, andrea@suse.de, linux-kernel@vger.kernel.org
Subject: Re: 2.4.25 SMP - BUG at page_alloc.c:105
Date: Wed, 24 Mar 2004 18:51:13 -0300 [thread overview]
Message-ID: <20040324215112.GA6931@logos.cnet> (raw)
In-Reply-To: <20040324122806.4015d3d6.akpm@osdl.org>
On Wed, Mar 24, 2004 at 12:28:06PM -0800, Andrew Morton wrote:
> Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
> >
> >
> > The backtrace is odd to me.
> >
> > set_page_dirty() does not call __free_pages_ok() directly or indirectly.
> >
>
> I'd suspect that's just gunk on the stack and that zap_pte_range() freed an
> anonymous page which had a non-null ->mapping. It could be a hardware bug.
> Without seeing the actual value of page->mapping it's hard to know.
>
> It would be good to backport the bad_page() debug code so we get a bit more
> info when this sort of thing happens.
This should work. Matthias, please apply and try to reproduce.
--- mm/page_alloc.c.orig 2004-03-24 18:42:53.693251224 -0300
+++ mm/page_alloc.c 2004-03-24 18:47:52.484828000 -0300
@@ -81,6 +81,20 @@
* -- wli
*/
+static void bad_page(const char *function, struct page *page)
+{
+ printk("Bad page state at %s\n", function);
+ printk("flags:0x%08lx mapping:%p buffers:%p count:%d\n",
+ page->flags, page->mapping,
+ page->buffers, page_count(page));
+ printk("Backtrace:\n");
+ dump_stack();
+ printk("bad_page: Trying to fix it up.\n");
+ set_page_count(page, 0);
+ page->mapping = NULL;
+}
+
+
static void FASTCALL(__free_pages_ok (struct page *page, unsigned int order));
static void __free_pages_ok (struct page *page, unsigned int order)
{
@@ -101,8 +115,8 @@
if (page->buffers)
BUG();
- if (page->mapping)
- BUG();
+ if (page->mapping)
+ bad_page(page);
if (!VALID_PAGE(page))
BUG();
if (PageLocked(page))
next prev parent reply other threads:[~2004-03-24 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-24 20:58 2.4.25 SMP - BUG at page_alloc.c:105 Marcelo Tosatti
2004-03-24 20:28 ` Andrew Morton
2004-03-24 21:12 ` Matthias Andree
2004-03-24 21:51 ` Marcelo Tosatti [this message]
2004-03-24 21:36 ` Matthias Andree
2004-03-25 0:22 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2004-03-22 14:49 Matthias Andree
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=20040324215112.GA6931@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.andree@gmx.de \
/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