[IPV4]: Fix garbage collection of multipath route entries
authorSuresh Bhogavilli <sbhogavilli@verisign.com>
Tue, 21 Feb 2006 21:42:22 +0000 (13:42 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 24 Feb 2006 00:10:52 +0000 (16:10 -0800)
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>
net/ipv4/route.c

index d82c242ea7049b7c84aaf03f71ae0dbc38f86c0c..fca5fe0cf94a397fe957f26a39ebd82054f9582c 100644 (file)
@@ -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;