summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-02-05 02:03:33 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-06 15:18:34 -0800
commit2af4b52988fd4f7ae525fcada29d4db8680033d6 (patch)
tree79e380d3877cc9d72cfcc3122916bac0af4c2056 /lib
parenta5ec68e3b8f2c95ea1a5d23dd543abbe0c8d0624 (diff)
downloadlinux-2af4b52988fd4f7ae525fcada29d4db8680033d6.tar.bz2
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')
-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)
}
}
+ synchronize_rcu();
+
bucket_table_free(old_tbl);
return 0;
}