ipv4, ipv6: kill ip_mc_{join, leave}_group and ipv6_sock_mc_{join, drop}
[deliverable/linux.git] / drivers / net / vxlan.c
index 25d92d4fc625e592424aa463782999e8faeed98f..8b8ca7492d564c6802678c7e93e6d034a408f775 100644 (file)
@@ -1097,7 +1097,6 @@ EXPORT_SYMBOL_GPL(vxlan_sock_release);
 
 /* Callback to update multicast group membership when first VNI on
  * multicast asddress is brought up
- * Done as workqueue because ip_mc_join_group acquires RTNL.
  */
 static void vxlan_igmp_join(struct work_struct *work)
 {
@@ -1107,6 +1106,7 @@ static void vxlan_igmp_join(struct work_struct *work)
        union vxlan_addr *ip = &vxlan->default_dst.remote_ip;
        int ifindex = vxlan->default_dst.remote_ifindex;
 
+       rtnl_lock();
        lock_sock(sk);
        if (ip->sa.sa_family == AF_INET) {
                struct ip_mreqn mreq = {
@@ -1122,6 +1122,7 @@ static void vxlan_igmp_join(struct work_struct *work)
 #endif
        }
        release_sock(sk);
+       rtnl_unlock();
 
        vxlan_sock_release(vs);
        dev_put(vxlan->dev);
@@ -1136,6 +1137,7 @@ static void vxlan_igmp_leave(struct work_struct *work)
        union vxlan_addr *ip = &vxlan->default_dst.remote_ip;
        int ifindex = vxlan->default_dst.remote_ifindex;
 
+       rtnl_lock();
        lock_sock(sk);
        if (ip->sa.sa_family == AF_INET) {
                struct ip_mreqn mreq = {
@@ -1152,6 +1154,7 @@ static void vxlan_igmp_leave(struct work_struct *work)
        }
 
        release_sock(sk);
+       rtnl_unlock();
 
        vxlan_sock_release(vs);
        dev_put(vxlan->dev);
This page took 0.024945 seconds and 5 git commands to generate.