public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] LIST_POISON with rcu
@ 2003-06-12 10:01 Maneesh Soni
  2003-06-12 15:15 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Maneesh Soni @ 2003-06-12 10:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, trond.myklebust

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-12 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-12 10:01 [patch] LIST_POISON with rcu Maneesh Soni
2003-06-12 15:15 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox