From: Christoph Hellwig Date: Mon, 7 Aug 2006 23:09:04 +0000 (-0700) Subject: [NET]: Assign skb->dev in netdev_alloc_skb X-Git-Tag: v2.6.18-rc5~121^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2e497a06c0e93719fda88820e057b635e8fae2;p=linux-2.6 [NET]: Assign skb->dev in netdev_alloc_skb Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 022d8894c1..c54f3664bc 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -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; }