From: Thomas Graf Date: Thu, 5 Feb 2015 01:03:33 +0000 (+0100) Subject: rhashtable: Wait for RCU readers after final unzip work X-Git-Tag: firefly_0821_release~176^2~2371^2~33^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2af4b52988fd4f7ae525fcada29d4db8680033d6;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: David S. Miller --- 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) } } + synchronize_rcu(); + bucket_table_free(old_tbl); return 0; }