[NET]: Assign skb->dev in netdev_alloc_skb
authorChristoph Hellwig <hch@lst.de>
Mon, 7 Aug 2006 23:09:04 +0000 (16:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2006 23:09:04 +0000 (16:09 -0700)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index 022d889..c54f366 100644 (file)
@@ -268,8 +268,10 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
        struct sk_buff *skb;
 
        skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
-       if (likely(skb))
+       if (likely(skb)) {
                skb_reserve(skb, NET_SKB_PAD);
+               skb->dev = dev;
+       }
        return skb;
 }