Re: [PATCH] radix_tree_tag_get() is not as safe as the docs make out

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Tuesday, April 6, 2010 - 2:18 pm

Nick Piggin <npiggin@suse.de> wrote:


I can do that.


I was thinking that the answer you get from radix_tree_tag_get() may be invalid
if the tag chain is being modified as you read it.  So if you do:

	rcu_read_lock()
	...
	x = radix_tree_tag_get(r, i, t);
	...
	y = radix_tree_tag_get(r, i, t);
	...
	rcu_read_unlock()

Then you can't guarantee that x == y, even though you were holding the RCU read
lock.

As you suggested, I'll try and come up with a comment modification to this
effect.

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

Messages in current thread:
Re: [PATCH] radix_tree_tag_get() is not as safe as the doc ..., David Howells, (Tue Apr 6, 2:18 pm)