rpms/kernel/FC-3 linux-2.6.11-x86_64-more-debug.patch, NONE, 1.1 kernel-2.6.spec, 1.833, 1.834

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue May 24 00:07:06 UTC 2005


Author: davej

Update of /cvs/dist/rpms/kernel/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv27495

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6.11-x86_64-more-debug.patch 
Log Message:
more debug


linux-2.6.11-x86_64-more-debug.patch:
 include/linux/mm.h |    1 +
 mm/memory.c        |    9 +++++++++
 mm/page_alloc.c    |    7 ++++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

--- NEW FILE linux-2.6.11-x86_64-more-debug.patch ---
--- linux-2.6.11/mm/page_alloc.c~	2005-05-23 19:58:54.000000000 -0400
+++ linux-2.6.11/mm/page_alloc.c	2005-05-23 20:01:20.000000000 -0400
@@ -852,6 +852,7 @@ nopage:
 	return NULL;
 got_pg:
 	zone_statistics(zonelist, z);
+	page->freer = (void *)-1ULL;
 	return page;
 }
 
@@ -893,13 +894,16 @@ void __pagevec_free(struct pagevec *pvec
 {
 	int i = pagevec_count(pvec);
 
-	while (--i >= 0)
+	while (--i >= 0) {
+		pvec->pages[i]->freer = (void *)__builtin_return_address(0);
 		free_hot_cold_page(pvec->pages[i], pvec->cold);
+	}
 }
 
 fastcall void __free_pages(struct page *page, unsigned int order)
 {
 	if (!PageReserved(page) && put_page_testzero(page)) {
+		page->freer = (void *)__builtin_return_address(0);
 		if (order == 0)
 			free_hot_page(page);
 		else
@@ -1536,6 +1540,7 @@ void __init memmap_init_zone(unsigned lo
 	struct page *page;
 
 	for (page = start; page < (start + size); page++) {
+		page->freer = NULL;
 		set_page_zone(page, NODEZONE(nid, zone));
 		set_page_count(page, 0);
 		reset_page_mapcount(page);
--- linux-2.6.11/include/linux/mm.h~	2005-05-23 20:01:26.000000000 -0400
+++ linux-2.6.11/include/linux/mm.h	2005-05-23 20:01:44.000000000 -0400
@@ -260,6 +260,7 @@ struct page {
 	void *virtual;			/* Kernel virtual address (NULL if
 					   not kmapped, ie. highmem) */
 #endif /* WANT_PAGE_VIRTUAL */
+	void *freer;
 };
 
 /*
--- linux-2.6.11/mm/memory.c~	2005-05-23 20:01:49.000000000 -0400
+++ linux-2.6.11/mm/memory.c	2005-05-23 20:03:05.000000000 -0400
@@ -49,6 +49,7 @@
 #include <linux/acct.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/kallsyms.h>
 
 #include <asm/pgalloc.h>
 #include <asm/uaccess.h>
@@ -93,6 +94,14 @@ static inline void clear_pmd_range(struc
 
 	if (pmd_none(*pmd))
 		return;
+	{
+		struct page *p = virt_to_page(pmd);
+		if (page_count(p) < 1) {
+			printk("%s:%d free pmd %lx ", current->comm, current->pid, addr);
+			print_symbol("freed by %s\n", (unsigned long)p->freer);
+		}
+	}
+
 	if (unlikely(pmd_bad(*pmd))) {
 		printk("%s:%d: ", current->comm, current->pid);
 		pmd_ERROR(*pmd);


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-3/kernel-2.6.spec,v
retrieving revision 1.833
retrieving revision 1.834
diff -u -r1.833 -r1.834
--- kernel-2.6.spec	20 May 2005 00:12:43 -0000	1.833
+++ kernel-2.6.spec	24 May 2005 00:07:04 -0000	1.834
@@ -146,7 +146,8 @@
 License: GPLv2
 Version: %{rpmversion}
 Release: %{release}
-ExclusiveArch: noarch %{all_x86} x86_64
+#ExclusiveArch: noarch %{all_x86} x86_64
+ExclusiveArch: noarch x86_64
 ExclusiveOS: Linux
 Provides: kernel = %{version}
 Provides: kernel-drm = 4.3.0
@@ -205,6 +206,8 @@
 Patch211: linux-2.6.11-x86_64-pmdpud-race.patch
 Patch212: linux-2.6.11-x86_64-badpmd-debug.patch
 Patch213: linux-2.6.11-x86_64-fault-fix.patch
+Patch214: linux-2.6.11-x86_64-more-debug.patch
+
 
 # 300 - 330   ppc(64)
 Patch300: linux-2.6.2-ppc64-build.patch
@@ -404,6 +407,8 @@
 %patch212 -p1
 # Fix bugs in x86-64's fault handler.
 %patch213 -p1
+# More debugging for teh pmd problem
+%patch214 -p1
 
 
 # 




More information about the fedora-cvs-commits mailing list