Commit bd6d4db5 authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

rhashtable: future table needs to be traversed when remove an object

When remove an object from hash table, we currently only traverse old
bucket table to check whether the object exists. If the object is not
found in it, we will try again. But in the second search loop, we still
search the object from the old table instead of future table. As a
result, the object may be not removed from hash table especially when
resizing is currently in progress and the object is just saved in the
future table.
Signed-off-by: default avatarYing Xue <>
Cc: Thomas Graf <>
Acked-by: default avatarThomas Graf <>
Signed-off-by: default avatarDavid S. Miller <>
parent db304854
......@@ -608,10 +608,10 @@ restart:
return true;
if (tbl != rht_dereference_rcu(ht->tbl, ht)) {
if (tbl != rht_dereference_rcu(ht->future_tbl, ht)) {
tbl = rht_dereference_rcu(ht->tbl, ht);
tbl = rht_dereference_rcu(ht->future_tbl, ht);
hash = head_hashfn(ht, tbl, obj);
lock = bucket_lock(tbl, hash);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment