net: igmp: add a missing rcu locking section
[linux-2.6-block.git] / net / ipv4 / igmp.c
index 10f7f74a0831ee3d4d6720552dfa91fddeb4c31a..f2402581fef1b559c0952e142a682d596d4be5b5 100644 (file)
@@ -386,7 +386,11 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, unsigned int mtu)
        pip->frag_off = htons(IP_DF);
        pip->ttl      = 1;
        pip->daddr    = fl4.daddr;
+
+       rcu_read_lock();
        pip->saddr    = igmpv3_get_srcaddr(dev, &fl4);
+       rcu_read_unlock();
+
        pip->protocol = IPPROTO_IGMP;
        pip->tot_len  = 0;      /* filled in later */
        ip_select_ident(net, skb, NULL);