Prechádzať zdrojové kódy

[IPV4]: Fix garbage collection of multipath route entries

When garbage collecting route cache entries of multipath routes
in rt_garbage_collect(), entries were deleted from the hash bucket
'i' while holding a spin lock on bucket 'k' resulting in a system
hang.  Delete entries, if any, from bucket 'k' instead.

Signed-off-by: Suresh Bhogavilli <sbhogavilli@verisign.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Suresh Bhogavilli 19 rokov pred
rodič
commit
8525987849
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      net/ipv4/route.c

+ 1 - 1
net/ipv4/route.c

@@ -835,7 +835,7 @@ static int rt_garbage_collect(void)
 					int r;
 
 					rthp = rt_remove_balanced_route(
-						&rt_hash_table[i].chain,
+						&rt_hash_table[k].chain,
 						rth,
 						&r);
 					goal -= r;