rpms/kernel/devel linux-2.6-debug-list_head.patch,1.4,1.5

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Jul 15 20:03:55 UTC 2006


Author: davej

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

Modified Files:
	linux-2.6-debug-list_head.patch 
Log Message:
further improvements.


linux-2.6-debug-list_head.patch:
 include/linux/list.h |   15 +++++++++
 lib/Kconfig.debug    |    9 +++++
 lib/Makefile         |    1 
 lib/list_debug.c     |   77 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+)

Index: linux-2.6-debug-list_head.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/linux-2.6-debug-list_head.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-debug-list_head.patch	15 Jul 2006 08:12:30 -0000	1.4
+++ linux-2.6-debug-list_head.patch	15 Jul 2006 20:03:41 -0000	1.5
@@ -1,3 +1,7 @@
+Debug variants of linked-list manipulation macros.
+
+Signed-off-by: Dave Jones <davej at redhat.com>
+
 diff --git a/include/linux/list.h b/include/linux/list.h
 index 6b74adf..5617c77 100644
 --- a/include/linux/list.h
@@ -115,13 +119,13 @@
 +			      struct list_head *prev,
 +			      struct list_head *next)
 +{
-+	if (next->prev != prev) {
-+		printk("List corruption. next->prev should be %p, but was %p\n",
++	if (unlikely(next->prev != prev)) {
++		printk("list_add corruption. next->prev should be %p, but was %p\n",
 +			prev, next->prev);
 +		BUG();
 +	}
-+	if (prev->next != next) {
-+		printk("List corruption. prev->next should be %p, but was %p\n",
++	if (unlikely(prev->next != next)) {
++		printk("list_add corruption. prev->next should be %p, but was %p\n",
 +			next, prev->next);
 +		BUG();
 +	}
@@ -154,13 +158,13 @@
 + */
 +void list_del(struct list_head *entry)
 +{
-+	if (entry->prev->next != entry) {
-+		printk("List corruption. prev->next should be %p, but was %p\n",
++	if (unlikely(entry->prev->next != entry)) {
++		printk("list_del corruption. prev->next should be %p, but was %p\n",
 +			entry, entry->prev->next);
 +		BUG();
 +	}
-+	if (entry->next->prev != entry) {
-+		printk("List corruption. next->prev should be %p, but was %p\n",
++	if (unlikely(entry->next->prev != entry)) {
++		printk("list_del corruption. next->prev should be %p, but was %p\n",
 +			entry, entry->next->prev);
 +		BUG();
 +	}




More information about the fedora-cvs-commits mailing list