lkml.org 
[lkml]   [2003]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] LIST_POISON with rcu
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/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.031 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site