浏览代码

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>
Thomas Graf 11 年之前
父节点
当前提交
2af4b52988
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/rhashtable.c

+ 2 - 0
lib/rhashtable.c

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