summaryrefslogtreecommitdiff
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-08-07 16:09:04 -0700
committerDavid S. Miller <davem@davemloft.net>2006-08-07 16:09:04 -0700
commit7b2e497a06c0e93719fda88820e057b635e8fae2 (patch)
tree5ca55484d813656f56cf7fc86cafd041327c7dae /net/core/skbuff.c
parent766ea8cce007e699679109df4fa469b870ba4860 (diff)
[NET]: Assign skb->dev in netdev_alloc_skb
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 022d8894c11d..c54f3664bce5 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;
}