]> Pileus Git - ~andy/linux/blobdiff - net/netfilter/ipvs/ip_vs_wrr.c
Merge tag 'cleanup-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / net / netfilter / ipvs / ip_vs_wrr.c
index b173ef907a1478692ec3d60ede0e18be93fea392..0e68555bceb9122a00283c147c977fbba01e4079 100644 (file)
@@ -170,7 +170,7 @@ ip_vs_wrr_schedule(struct ip_vs_service *svc, const struct sk_buff *skb)
 
        IP_VS_DBG(6, "%s(): Scheduling...\n", __func__);
 
-       spin_lock(&svc->sched_lock);
+       spin_lock_bh(&svc->sched_lock);
        dest = mark->cl;
        /* No available dests? */
        if (mark->mw == 0)
@@ -222,7 +222,7 @@ found:
        mark->cl = dest;
 
   out:
-       spin_unlock(&svc->sched_lock);
+       spin_unlock_bh(&svc->sched_lock);
        return dest;
 
 err_noavail:
@@ -261,6 +261,7 @@ static int __init ip_vs_wrr_init(void)
 static void __exit ip_vs_wrr_cleanup(void)
 {
        unregister_ip_vs_scheduler(&ip_vs_wrr_scheduler);
+       synchronize_rcu();
 }
 
 module_init(ip_vs_wrr_init);