rpms/kernel/devel linux-2.6-debug-spinlock-taint.patch, 1.9, 1.10 linux-2.6-debug-taint-vm.patch, 1.17, 1.18

Dave Jones (davej) fedora-extras-commits at redhat.com
Fri Dec 14 03:42:51 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2849

Modified Files:
	linux-2.6-debug-spinlock-taint.patch 
	linux-2.6-debug-taint-vm.patch 
Log Message:
rework to use out of line WARN_ON(), and assorted cleanups

linux-2.6-debug-spinlock-taint.patch:

Index: linux-2.6-debug-spinlock-taint.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-debug-spinlock-taint.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- linux-2.6-debug-spinlock-taint.patch	13 Dec 2007 22:55:04 -0000	1.9
+++ linux-2.6-debug-spinlock-taint.patch	14 Dec 2007 03:42:44 -0000	1.10
@@ -1,6 +1,8 @@
---- linux-2.6/lib/spinlock_debug.c~	2007-10-22 01:15:04.000000000 -0400
-+++ linux-2.6/lib/spinlock_debug.c	2007-10-22 01:17:03.000000000 -0400
-@@ -58,9 +58,9 @@ static void spin_bug(spinlock_t *lock, c
+diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
+index 9c4b025..b7a010a 100644
+--- a/lib/spinlock_debug.c
++++ b/lib/spinlock_debug.c
+@@ -58,9 +58,9 @@ static void spin_bug(spinlock_t *lock, const char *msg)
  
  	if (lock->owner && lock->owner != SPINLOCK_OWNER_INIT)
  		owner = lock->owner;
@@ -12,7 +14,7 @@
  	printk(KERN_EMERG " lock: %p, .magic: %08x, .owner: %s/%d, "
  			".owner_cpu: %d\n",
  		lock, lock->magic,
-@@ -114,9 +114,9 @@ static void __spin_lock_debug(spinlock_t
+@@ -114,9 +114,9 @@ static void __spin_lock_debug(spinlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: spinlock lockup on CPU#%d, "
@@ -24,7 +26,7 @@
  			dump_stack();
  #ifdef CONFIG_SMP
  			trigger_all_cpu_backtrace();
-@@ -159,9 +159,9 @@ static void rwlock_bug(rwlock_t *lock, c
+@@ -159,9 +159,9 @@ static void rwlock_bug(rwlock_t *lock, const char *msg)
  	if (!debug_locks_off())
  		return;
  
@@ -36,7 +38,7 @@
  	dump_stack();
  }
  
-@@ -177,9 +177,9 @@ static void __read_lock_debug(rwlock_t *
+@@ -184,9 +184,9 @@ static void __read_lock_debug(rwlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: read-lock lockup on CPU#%d, "
@@ -48,7 +50,7 @@
  			dump_stack();
  		}
  	}
-@@ -250,9 +250,9 @@ static void __write_lock_debug(rwlock_t 
+@@ -259,9 +259,9 @@ static void __write_lock_debug(rwlock_t *lock)
  		if (print_once) {
  			print_once = 0;
  			printk(KERN_EMERG "BUG: write-lock lockup on CPU#%d, "
@@ -60,3 +62,4 @@
  			dump_stack();
  		}
  	}
+

linux-2.6-debug-taint-vm.patch:

Index: linux-2.6-debug-taint-vm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-debug-taint-vm.patch,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- linux-2.6-debug-taint-vm.patch	13 Dec 2007 22:55:04 -0000	1.17
+++ linux-2.6-debug-taint-vm.patch	14 Dec 2007 03:42:44 -0000	1.18
@@ -1,5 +1,7 @@
---- linux-2.6/include/asm-generic/bug.h~	2007-02-12 16:18:21.000000000 -0500
-+++ linux-2.6/include/asm-generic/bug.h	2007-02-12 16:19:57.000000000 -0500
+diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
+index d56fedb..e35833a 100644
+--- a/include/asm-generic/bug.h
++++ b/include/asm-generic/bug.h
 @@ -3,6 +3,10 @@
  
  #include <linux/compiler.h>
@@ -16,27 +18,49 @@
  #ifndef HAVE_ARCH_BUG
  #define BUG() do { \
 -	printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-+	printk(KERN_ERR "BUG: failure at %s:%d/%s()! (%s)\n",
++	printk(KERN_ERR "BUG: failure at %s:%d/%s()! (%s)\n",	\
 +		__FILE__, __LINE__, __FUNCTION__, print_tainted()); \
  	panic("BUG!"); \
  } while (0)
  #endif
-@@ -39,8 +39,9 @@ struct bug_entry {
+@@ -32,13 +37,11 @@ struct bug_entry {
+ #endif
+ 
+ #ifndef HAVE_ARCH_WARN_ON
++void out_of_line_warnon(char *file, unsigned int line, const char *func);
  #define WARN_ON(condition) ({						\
  	int __ret_warn_on = !!(condition);				\
- 	if (unlikely(__ret_warn_on)) {					\
+-	if (unlikely(__ret_warn_on)) {					\
 -		printk("WARNING: at %s:%d %s()\n", __FILE__,		\
 -			__LINE__, __FUNCTION__);			\
-+		printk(KERN_ERR "WARNING: at %s:%d %s() (%s)\n",	\
-+			 __FILE__, __LINE__, __FUNCTION__,		\
-+			 print_tainted());				\
- 		dump_stack();						\
- 	}								\
+-		dump_stack();						\
+-	}								\
++	if (unlikely(__ret_warn_on))					\
++		out_of_line_warnon(__FILE__, __LINE__, __FUNCTION__);	\
  	unlikely(__ret_warn_on);					\
-diff -urNp --exclude-from=/home/davej/.exclude linux-1740/kernel/panic.c linux-2000/kernel/panic.c
---- linux-1740/kernel/panic.c
-+++ linux-2000/kernel/panic.c
-@@ -151,6 +151,7 @@ const char *print_tainted(void)
+ })
+ #endif
+diff --git a/init/main.c b/init/main.c
+index 80b04b6..b1fad76 100644
+--- a/init/main.c
++++ b/init/main.c
+@@ -855,3 +855,11 @@ static int __init kernel_init(void * unused)
+ 	init_post();
+ 	return 0;
+ }
++
++void out_of_line_warnon(char *file, unsigned int line, const char *func)
++{
++	printk(KERN_ERR "WARNING: at %s:%d %s() (%s)\n",
++		file, line, func, print_tainted());
++	dump_stack();
++}
++EXPORT_SYMBOL(out_of_line_warnon);
+diff --git a/kernel/panic.c b/kernel/panic.c
+index 6f6e03e..198fc58 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -173,6 +173,7 @@ const char *print_tainted(void)
  		snprintf(buf, sizeof(buf), "Not tainted");
  	return(buf);
  }
@@ -44,9 +68,11 @@
  
  void add_taint(unsigned flag)
  {
---- linux-2.6/mm/page_alloc.c~	2006-01-07 20:48:33.000000000 -0500
-+++ linux-2.6/mm/page_alloc.c	2006-01-07 20:49:24.000000000 -0500
-@@ -137,12 +137,12 @@ static inline int bad_range(struct zone 
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index b5a58d4..7a0c25d 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -221,12 +221,12 @@ static inline int bad_range(struct zone *zone, struct page *page)
  static void bad_page(struct page *page)
  {
  	printk(KERN_EMERG "Bad page state in process '%s'\n"
@@ -61,9 +87,11 @@
  	dump_stack();
  	page->flags &= ~(1 << PG_lru	|
  			1 << PG_private |
---- linux-2.6/mm/slab.c~	2007-05-27 22:57:44.000000000 -0400
-+++ linux-2.6/mm/slab.c	2007-05-27 22:58:08.000000000 -0400
-@@ -1816,8 +1816,8 @@ static void check_poison_obj(struct kmem
+diff --git a/mm/slab.c b/mm/slab.c
+index 2e338a5..e5627f9 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -1846,8 +1846,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
  			/* Print header */
  			if (lines == 0) {
  				printk(KERN_ERR
@@ -74,7 +102,7 @@
  				print_objinfo(cachep, objp, 0);
  			}
  			/* Hexdump the affected line */
-@@ -2924,8 +2924,8 @@ static void check_slabp(struct kmem_cach
+@@ -2935,8 +2935,8 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
  	if (entries != cachep->num - slabp->inuse) {
  bad:
  		printk(KERN_ERR "slab: Internal list corruption detected in "
@@ -85,9 +113,11 @@
  		for (i = 0;
  		     i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
  		     i++) {
---- linux-2.6/mm/slub.c~	2007-07-20 14:15:05.000000000 -0400
-+++ linux-2.6/mm/slub.c	2007-07-20 14:17:37.000000000 -0400
-@@ -450,7 +450,7 @@ static void slab_bug(struct kmem_cache *
+diff --git a/mm/slub.c b/mm/slub.c
+index 9c1d9f3..e11d58d 100644
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -451,7 +451,7 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
  	va_end(args);
  	printk(KERN_ERR "========================================"
  			"=====================================\n");




More information about the fedora-extras-commits mailing list