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

From: David Howells
Date: Tue Apr 06 2010 - 17:19:26 EST

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:

x = radix_tree_tag_get(r, i, t);
y = radix_tree_tag_get(r, i, t);

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

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at