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: 7e1e77636e ("lib: Resizable, Scalable, Concurrent Hash Table")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Graf 2015-02-05 02:03:33 +01:00 committed by David S. Miller
parent a5ec68e3b8
commit 2af4b52988
1 changed files with 2 additions and 0 deletions

View File

@ -392,6 +392,8 @@ int rhashtable_expand(struct rhashtable *ht)
}
}
synchronize_rcu();
bucket_table_free(old_tbl);
return 0;
}