rhashtable: Extend RCU read lock into rhashtable_insert_rehash()
rhashtable_insert_rehash() requires RCU locks to be held in order
to access ht->tbl and traverse to the last table.
Fixes: ccd57b1bd3 ("rhashtable: Add immediate rehash during insertion")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
27cd545247
commit
58be8a583d
1 changed files with 1 additions and 1 deletions
|
|
@ -585,8 +585,8 @@ restart:
|
||||||
if (unlikely(rht_grow_above_100(ht, tbl))) {
|
if (unlikely(rht_grow_above_100(ht, tbl))) {
|
||||||
slow_path:
|
slow_path:
|
||||||
spin_unlock_bh(lock);
|
spin_unlock_bh(lock);
|
||||||
rcu_read_unlock();
|
|
||||||
err = rhashtable_insert_rehash(ht);
|
err = rhashtable_insert_rehash(ht);
|
||||||
|
rcu_read_unlock();
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue