]> git.hungrycats.org Git - linux/commitdiff
[IPV4]: Fix deadlock on ip_mc_list->lock
authorPetr Vandrovec <vandrove@vc.cvut.cz>
Tue, 7 Oct 2003 00:56:33 +0000 (17:56 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Tue, 7 Oct 2003 00:56:33 +0000 (17:56 -0700)
net/ipv4/igmp.c

index e5f2e6f6490b41d3df52778e47c6ea04b5c4e1f8..ab0f4ca19017b4061a0633f7992c722d76020a9f 100644 (file)
@@ -1391,8 +1391,9 @@ int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
        sf_markstate(pmc);
 #endif
        if (!delta) {
+               err = -EINVAL;
                if (!pmc->sfcount[sfmode])
-                       return -EINVAL;
+                       goto out_unlock;
                pmc->sfcount[sfmode]--;
        }
        err = 0;
@@ -1423,6 +1424,7 @@ int ip_mc_del_src(struct in_device *in_dev, __u32 *pmca, int sfmode,
                igmp_ifc_event(pmc->interface);
 #endif
        }
+out_unlock:
        spin_unlock_bh(&pmc->lock);
        return err;
 }