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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nick Piggin <npiggin@xxxxxxx> wrote:

> Nack, just drop the BUG_ON.

I can do that.

> I don't know what you mean by "untrustworthy answer".

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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]