[patch] LIST_POISON with rcu

From: Maneesh Soni (maneesh@in.ibm.com)
Date: Thu Jun 12 2003 - 05:01:26 EST


Hi,

LIST_POISON will not work with RCU based lists as we depend on the
fact the deleted list element can still point to the existing list.
Though any new user will not be able to reach the deleted element.
This is one of the reasons why we don't do list_del_init_rcu().
The folloing patch fixes this.

Trond, I am not sure if you are seeing the d_move() oops because
of this. It will be nice if you can post the oops message also.

Regards,
Maneesh

diff -urN linux-2.5.70-mm8/include/linux/list.h linux-2.5.70-mm8-LIST_POISON/include/linux/list.h
--- linux-2.5.70-mm8/include/linux/list.h Thu Jun 12 15:26:06 2003
+++ linux-2.5.70-mm8-LIST_POISON/include/linux/list.h Thu Jun 12 15:24:51 2003
@@ -162,8 +162,6 @@
 static inline void list_del_rcu(struct list_head *entry)
 {
         __list_del(entry->prev, entry->next);
- entry->next = LIST_POISON1;
- entry->prev = LIST_POISON2;
 }
 
 /**
@@ -434,7 +432,10 @@
         n->pprev = LIST_POISON2;
 }
 
-#define hlist_del_rcu hlist_del /* list_del_rcu is identical too? */
+static __inline__ void hlist_del_rcu(struct hlist_node *n)
+{
+ __hlist_del(n);
+}
 
 static __inline__ void hlist_del_init(struct hlist_node *n)
 {

-- 
Maneesh Soni
IBM Linux Technology Center, 
IBM India Software Lab, Bangalore.
Phone: +91-80-5044999 email: maneesh@in.ibm.com
http://lse.sourceforge.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:31 EST