aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-02-04 20:03:33 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-06 18:18:34 -0500
commit2af4b52988fd4f7ae525fcada29d4db8680033d6 (patch)
tree79e380d3877cc9d72cfcc3122916bac0af4c2056 /lib/rhashtable.c
parenta5ec68e3b8f2c95ea1a5d23dd543abbe0c8d0624 (diff)
rhashtable: Wait for RCU readers after final unzip work
We need to wait for all RCU readers to complete after the last bit of unzipping has been completed. Otherwise the old table is freed up prematurely. Fixes: 7e1e77636e36 ("lib: Resizable, Scalable, Concurrent Hash Table") Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index cea4244e032b..fd1033d518c6 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -392,6 +392,8 @@ int rhashtable_expand(struct rhashtable *ht)
392 } 392 }
393 } 393 }
394 394
395 synchronize_rcu();
396
395 bucket_table_free(old_tbl); 397 bucket_table_free(old_tbl);
396 return 0; 398 return 0;
397} 399}