Message ID | 152782824927.30340.12281188634659526226.stgit@noble |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Series | Assorted rhashtable improvements | expand |
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index f4000c137dbe..bf92b7aa2a49 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -499,6 +499,8 @@ static unsigned int __init print_ht(struct rhltable *rhlt) unsigned int i, cnt = 0; ht = &rhlt->ht; + /* Take the mutex to avoid RCU warning */ + mutex_lock(&ht->mutex); tbl = rht_dereference(ht->tbl, ht); for (i = 0; i < tbl->size; i++) { struct rhash_head *pos, *next; @@ -532,6 +534,7 @@ static unsigned int __init print_ht(struct rhltable *rhlt) } } printk(KERN_ERR "\n---- ht: ----%s\n-------------\n", buff); + mutex_unlock(&ht->mutex); return cnt; }