From: Aubrey <aubreylee@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: mpm@selenic.com, dhowells@redhat.com, davidm@snapgear.com,
gerg@snapgear.com
Subject: kernel BUGs when removing largish files with the SLOB allocator
Date: Mon, 4 Sep 2006 14:56:33 +0800 [thread overview]
Message-ID: <6d6a94c50609032356t47950e40lbf77f15136e67bc5@mail.gmail.com> (raw)
Hi all,
I'm working on the nommu blackfin uclinux(2.6.16) platform and get a
kernel BUG! at mm/nommu.c:124 when removing largish file with the SLOB
allocator.
root:~> df -k
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock3 3008 1264 1744 42% /
root:~> cp /bin/busybox /busy
root:~> df -k
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock3 3008 1532 1476 51% /
root:~> ls -l /bin/busybox /busy
-rwxr-xr-x 1 0 0 423904 /bin/busybox
-rwxr-xr-x 1 0 0 423904 /busy
root:~> md5sum /bin/busybox
7db253a2259ab71bc854c9e5dac544d6 /bin/busybox
root:~> md5sum /busy
7db253a2259ab71bc854c9e5dac544d6 /busy
root:~> rm /busy
kernel BUG at mm/nommu.c:124!
Kernel panic - not syncing: BUG!
Bug comes from mm/nommu.c:
=======================================
if (!objp || !((page = virt_to_page(objp))) ||
(unsigned long)objp >= memory_end)
return 0;
if (PageSlab(page))
return ksize(objp);
BUG_ON(page->index < 0);
124: BUG_ON(page->index >= MAX_ORDER);
=======================================
This seems that the SLOB allocator doesn't set the SLAB page flag
while nommu.c seem to be written for SLAB only.
On my side the following patch seems to work around the issue
============================================================
--- nommu.c 2006-06-26 14:49:28.000000000 +0800
+++ nommu.c.new 2006-06-26 14:47:20.000000000 +0800
@@ -18,7 +18,9 @@
#include <linux/file.h>
#include <linux/highmem.h>
#include <linux/pagemap.h>
-#include <linux/slab.h>
+#ifdef CONFIG_SLAB
+# include <linux/slab.h>
+#endif
#include <linux/vmalloc.h>
#include <linux/ptrace.h>
#include <linux/blkdev.h>
@@ -117,7 +119,9 @@
if (!objp || !((page = virt_to_page(objp))) || (unsigned
long)objp >= memory_end)
return 0;
+#ifdef CONFIG_SLAB
if (PageSlab(page))
+#endif
return ksize(objp);
BUG_ON(page->index < 0);
============================================================
Is there any solution/patch to fix the issue?
Any suggestions are really appreciated.
Thanks,
-Aubrey
--
VGER BF report: U 0.498985
next reply other threads:[~2006-09-04 6:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-04 6:56 Aubrey [this message]
2006-09-04 10:21 ` David Howells
2006-09-05 3:52 ` Aubrey
2006-09-05 9:35 ` David Howells
2006-09-06 2:35 ` Aubrey
2006-09-06 3:36 ` Nick Piggin
2006-09-12 8:07 ` Aubrey
2006-09-12 17:43 ` Matt Mackall
2006-09-12 19:10 ` David Howells
2006-09-12 20:51 ` Matt Mackall
2006-09-12 20:56 ` David Howells
2006-09-12 21:04 ` Matt Mackall
2006-09-12 21:59 ` David Howells
2006-09-13 19:39 ` Matt Mackall
2006-09-13 2:16 ` Nick Piggin
2006-09-13 7:21 ` Aubrey
2006-09-12 19:25 ` David Howells
2006-09-12 20:28 ` Matt Mackall
2006-09-12 20:49 ` Matt Mackall
2006-09-12 21:02 ` David Howells
2006-09-12 21:15 ` Matt Mackall
2006-09-12 8:54 ` David Howells
2006-09-12 10:53 ` Aubrey
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=6d6a94c50609032356t47950e40lbf77f15136e67bc5@mail.gmail.com \
--to=aubreylee@gmail.com \
--cc=davidm@snapgear.com \
--cc=dhowells@redhat.com \
--cc=gerg@snapgear.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
/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
all inboxes | Powered by JetHome®