LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[PATCH] ipvs -- fix error's in list_for_each changes.

To: Julian Anastasov <ja@xxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>
Subject: [PATCH] ipvs -- fix error's in list_for_each changes.
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Cc: Wensong Zhang <wensong@xxxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxx
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Mon, 22 Sep 2003 11:22:04 -0700
The earlier list_for_each changes introduced a couple of bugs where
lines got dropped.  This restores them.

diff -Nru a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c
--- a/net/ipv4/ipvs/ip_vs_app.c Mon Sep 22 11:19:05 2003
+++ b/net/ipv4/ipvs/ip_vs_app.c Mon Sep 22 11:19:05 2003
@@ -222,6 +222,8 @@
                ip_vs_app_inc_release(inc);
        }
 
+       list_del(&app->a_list);
+
        up(&__ip_vs_app_mutex);
 
        /* decrease the module use count */
diff -Nru a/net/ipv4/ipvs/ip_vs_rr.c b/net/ipv4/ipvs/ip_vs_rr.c
--- a/net/ipv4/ipvs/ip_vs_rr.c  Mon Sep 22 11:19:05 2003
+++ b/net/ipv4/ipvs/ip_vs_rr.c  Mon Sep 22 11:19:05 2003
@@ -73,12 +73,12 @@
                        continue;
                }
                
-       
                dest = list_entry(q, struct ip_vs_dest, n_list);
                if (!(dest->flags & IP_VS_DEST_F_OVERLOAD) &&
                    atomic_read(&dest->weight) > 0)
                        /* HIT */
                        goto out;
+               q = q->next;
        } while (q != p);
        write_unlock(&svc->sched_lock);
        return NULL;
<Prev in Thread] Current Thread [Next in Thread>