Nick Piggin wrote:
shift -= RADIX_TREE_MAP_SHIFT; - slot = slot->slots[i]; + slot = rcu_dereference(slot->slots[i]); + if (slot == NULL); + break; }^^^^^^^^ Up there.
And here's the patch. -- SUSE Labs, Novell Inc.
Index: linux-2.6/lib/radix-tree.c =================================================================== --- linux-2.6.orig/lib/radix-tree.c +++ linux-2.6/lib/radix-tree.c @@ -752,7 +752,7 @@ __lookup_tag(struct radix_tree_node *slo } shift -= RADIX_TREE_MAP_SHIFT; slot = rcu_dereference(slot->slots[i]); - if (slot == NULL); + if (slot == NULL) break; } out:
- References:
- [patch 0/3] 2.6.17 radix-tree: updates and lockless
- From: Nick Piggin <[email protected]>
- [patch 3/3] radix-tree: RCU lockless readside
- From: Nick Piggin <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: "Paul E. McKenney" <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: Nick Piggin <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: "Paul E. McKenney" <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: Nick Piggin <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: Andrew Morton <[email protected]>
- Re: [patch 3/3] radix-tree: RCU lockless readside
- From: Nick Piggin <[email protected]>
- [patch 0/3] 2.6.17 radix-tree: updates and lockless
- Prev by Date: Re: [patch 3/3] radix-tree: RCU lockless readside
- Next by Date: Re: [patch 06/61] lock validator: add __module_address() method
- Previous by thread: Re: [patch 3/3] radix-tree: RCU lockless readside
- Next by thread: Userspace RCU+rtth hack (was Re: [patch 3/3] radix-tree: RCU lockless readside)
- Index(es):