rpms/kernel/devel linux-2.6-vm-debug.patch, NONE, 1.1 kernel-2.6.spec, 1.1821, 1.1822
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jan 6 03:15:25 UTC 2006
Author: davej
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8626
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-vm-debug.patch
Log Message:
some more debug info about the pagecount going negative.
linux-2.6-vm-debug.patch:
drivers/scsi/st.c | 1 +
include/linux/mm.h | 1 +
mm/rmap.c | 7 +++++++
3 files changed, 9 insertions(+)
--- NEW FILE linux-2.6-vm-debug.patch ---
--- linux-2.6.15/mm/rmap.c~ 2006-01-03 08:53:32.000000000 -0500
+++ linux-2.6.15/mm/rmap.c 2006-01-03 08:58:19.000000000 -0500
@@ -484,6 +484,13 @@ void page_remove_rmap(struct page *page)
BUG_ON(PageReserved(page));
if (atomic_add_negative(-1, &page->_mapcount)) {
+ if (page_mapcount(page) < 0) {
+ printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page));
+ printk (KERN_EMERG " page->flags = %lx\n", page->flags);
+ printk (KERN_EMERG " page->count = %x\n", page_count(page));
+ printk (KERN_EMERG " page->mapping = %p\n", page->mapping);
+ }
+
BUG_ON(page_mapcount(page) < 0);
/*
* It would be tidy to reset the PageAnon mapping here,
--- linux-2.6.15/drivers/scsi/st.c~ 2006-01-05 21:58:31.000000000 -0500
+++ linux-2.6.15/drivers/scsi/st.c 2006-01-05 21:59:31.000000000 -0500
@@ -4508,6 +4508,7 @@ static int sgl_unmap_user_pages(struct s
for (i=0; i < nr_pages; i++) {
struct page *page = sgl[i].page;
+ sgl[i].page = NULL;
if (dirtied)
SetPageDirty(page);
/* FIXME: cache flush missing for rw==READ
--- linux-2.6.15/include/linux/mm.h~ 2006-01-05 22:02:20.000000000 -0500
+++ linux-2.6.15/include/linux/mm.h 2006-01-05 22:02:48.000000000 -0500
@@ -299,6 +299,7 @@ struct page {
#define put_page_testzero(p) \
({ \
BUG_ON(page_count(p) == 0); \
+ BUG_ON(page_count(p) <= page_mapcount(p)); \
atomic_add_negative(-1, &(p)->_count); \
})
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.1821
retrieving revision 1.1822
diff -u -r1.1821 -r1.1822
--- kernel-2.6.spec 5 Jan 2006 11:02:08 -0000 1.1821
+++ kernel-2.6.spec 6 Jan 2006 03:15:23 -0000 1.1822
@@ -374,6 +374,7 @@
# VM bits.
Patch2000: linux-2.6-vm-oomkiller-debugging.patch
Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
+Patch2002: linux-2.6-vm-debug.patch
# Broadcom wireless driver
Patch5000: linux-2.6-bcm43xx.patch
@@ -876,6 +877,8 @@
%patch2000 -p1
# Silence GFP_ATOMIC failures.
%patch2001 -p1
+# Try to trace some negative pagecount errors.
+%patch2002 -p1
#
# Patches 5000 to 6000 are reserved for new drivers that are about to
@@ -1391,6 +1394,9 @@
%endif
%changelog
+* Thu Jan 5 2006 Dave Jones <davej at redhat.com>
+- Try to debug some negative pagecount errors.
+
* Tue Jan 3 2006 Dave Jones <davej at redhat.com>
- Silence some gcc4.1 warnings.
More information about the fedora-cvs-commits
mailing list