Commit b3347a23 authored by Petr Vandrovec's avatar Petr Vandrovec Committed by David S. Miller

[IPV4]: Fix deadlock on ip_mc_list->lock

parent 8575258e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment