mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 08:45:18 -04:00
rhashtable: fix false-positive lockdep splat on rhltable destruction
Blamed commit removed ht->mutex usage during destruction but forgot to
switch rhashtable_free_one() to rcu_dereference_raw(), this triggers a
lockdep splat when an rhltable gets zapped.
Fixes: 09ae540e1d ("rhashtable: drop ht->mutex in rhashtable_free_and_destroy()")
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
360f2974fc
commit
1132c38927
@@ -1261,7 +1261,7 @@ static void rhashtable_free_one(struct rhashtable *ht, struct rhash_head *obj,
|
||||
list = container_of(obj, struct rhlist_head, rhead);
|
||||
do {
|
||||
obj = &list->rhead;
|
||||
list = rht_dereference(list->next, ht);
|
||||
list = rcu_dereference_raw(list->next);
|
||||
free_fn(rht_obj(ht, obj), arg);
|
||||
} while (list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user