[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 022d8894c11de1ef21839988f5b233ca878db1ef..c54f3664bce5b0e868928df71c392dc18f89f2a0 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;
 }