mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
rhashtable: Add barrier to ensure we see new tables in walker
The walker is a lockless reader so it too needs an smp_rmb before reading the future_tbl field in order to see any new tables that may contain elements that we should have walked over. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e167359be0
commit
d88252f9bb
@ -477,6 +477,9 @@ next:
|
||||
iter->skip = 0;
|
||||
}
|
||||
|
||||
/* Ensure we see any new tables. */
|
||||
smp_rmb();
|
||||
|
||||
iter->walker->tbl = rht_dereference_rcu(tbl->future_tbl, ht);
|
||||
if (iter->walker->tbl) {
|
||||
iter->slot = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user