Thread (1 message) 1 message, 1 author, 2012-09-09

Re: [PATCH RFC for-next] net/mlx4_core: Fix racy flow in the driver CQ completion handler

From: Roland Dreier <hidden>
Date: 2012-09-09 15:10:37

On Sun, Sep 9, 2012 at 7:09 AM, Or Gerlitz [off-list ref] wrote:
quoted
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help