diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-03-24 09:18:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-24 17:48:39 -0400 |
commit | 58be8a583d8d316448bafa5926414cfb83c02dec (patch) | |
tree | 092d64f3cdb0c8ebc32bebc5b6391406e53acc6a /include/linux/rhashtable.h | |
parent | 27cd5452476978283decb19e429e81fc6c71e74b (diff) |
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: ccd57b1bd324 ("rhashtable: Add immediate rehash during insertion")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r-- | include/linux/rhashtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index d7be9cb0e91f..5976ab59b88f 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
@@ -585,8 +585,8 @@ restart: | |||
585 | if (unlikely(rht_grow_above_100(ht, tbl))) { | 585 | if (unlikely(rht_grow_above_100(ht, tbl))) { |
586 | slow_path: | 586 | slow_path: |
587 | spin_unlock_bh(lock); | 587 | spin_unlock_bh(lock); |
588 | rcu_read_unlock(); | ||
589 | err = rhashtable_insert_rehash(ht); | 588 | err = rhashtable_insert_rehash(ht); |
589 | rcu_read_unlock(); | ||
590 | if (err) | 590 | if (err) |
591 | return err; | 591 | return err; |
592 | 592 | ||