Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315783
b: refs/heads/master
c: 1080e51
h: refs/heads/master
i:
  315781: 77556b9
  315779: e860053
  315775: c209776
v: v3
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed Jul 22, 2012
1 parent 16c14f1 commit 924d30e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 868eefeb17d40f6acde00ad8165a268529cf6d24
refs/heads/master: 1080e512d44d4f67b8beb8edf25a1bbcb1066dc7
7 changes: 6 additions & 1 deletion trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,8 @@ static inline int deliver_skb(struct sk_buff *skb,
struct packet_type *pt_prev,
struct net_device *orig_dev)
{
if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
return -ENOMEM;
atomic_inc(&skb->users);
return pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
}
Expand Down Expand Up @@ -3262,7 +3264,10 @@ static int __netif_receive_skb(struct sk_buff *skb)
}

if (pt_prev) {
ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
ret = -ENOMEM;
else
ret = pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
} else {
atomic_long_inc(&skb->dev->rx_dropped);
kfree_skb(skb);
Expand Down

0 comments on commit 924d30e

Please sign in to comment.