On Sun, Sep 9, 2012 at 7:09 AM, Or Gerlitz <[email protected]> wrote:
>> I honestly do see how - the height of the root node is updated
>> indepedently of the slots, so if someone managed to get the updated
>> height there is nothing from stoping radix_tree_lookup from going too
>> deep into the chain of slots.
Please look at commit 7cf9c2c76c1a ("[PATCH] radix-tree: RCU lockless readside")
Make radix tree lookups safe to be performed without locks. Readers are
protected against nodes being deleted by using RCU based freeing. Readers
are protected against new node insertion by using memory barriers to ensure
the node itself will be properly written before it is visible in the radix
tree.
etc. Also the API description in <linux/radix-tree.h> is helpful.
Before we randomly throw in locking, let's please have at least a theory
about what race we're actually protecting against.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html