Re:Sleeping in RCU list traversal

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <penguin-kernel@...>
Cc: <linux-kernel@...>
Date: Sunday, October 7, 2007 - 3:11 pm

Hi
 >}
 >rcu_read_unlock();

In Document/RCU/whatisRCU.txt
Note that the value returned by rcu_dereference() is valid
	only within the enclosing RCU read-side critical section.
	For example, the following is -not- legal:

		rcu_read_lock();
		p = rcu_dereference(head.next);
		rcu_read_unlock();
		x = p->address;
		rcu_read_lock();
		y = p->data;
		rcu_read_unlock();

	Holding a reference from one RCU read-side critical section
	to another is just as illegal as holding a reference from
	one lock-based critical section to another!  Similarly,
	using a reference outside of the critical section in which
	it was acquired is just as illegal as doing so with normal
	locking.
                                                            Jun Wang

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re:Sleeping in RCU list traversal, Jun WANG, (Sun Oct 7, 3:11 pm)
Re: Sleeping in RCU list traversal, Tetsuo Handa, (Sun Oct 7, 9:26 am)
Re: Sleeping in RCU list traversal, Jun WANG, (Sun Oct 7, 6:37 pm)
Re: Sleeping in RCU list traversal, Tetsuo Handa, (Sun Oct 7, 12:56 pm)
Re: Sleeping in RCU list traversal, Peter Zijlstra, (Sun Oct 7, 2:33 pm)
Re: Sleeping in RCU list traversal, Tetsuo Handa, (Sun Oct 7, 3:56 pm)