Re: [PATCH] mm: migration: Use rcu_dereference_protected when dereferencing the radix tree slot during file page migration

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

[ Add Paul back to the CC list, and also Dipankar.
 Hopefully I killed the mime encodings correctly ]

On Tue, 21 Dec 2010 at 08:48:50 +0900, Minchan Kim wrote:

I'm not Paul but I can read the code in include/linux/rcuupdate.h.

Holding rcu_read_lock_held isn't a problem, but using protected with
just the read lock is.



No this is a problem

.. because __rcu_dereference_protected doesn't include the 
smp_read_barrier_depends() that is needed in the rcu only reference path.


Either we need two helpers, one for when the tree is write locked and
one when the tree is only rcu read locked, or we use __rcu_dereference_check
with check = 1.


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

Messages in current thread:
Re: [PATCH] mm: migration: Use rcu_dereference_protected w ..., Milton Miller, (Tue Dec 21, 12:16 am)
Re: [PATCH] mm: migration: Use rcu_dereference_protected w ..., KAMEZAWA Hiroyuki, (Wed Dec 22, 1:56 am)