Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149773
b: refs/heads/master
c: 8549889
h: refs/heads/master
i:
  149771: 3bf5d42
v: v3
  • Loading branch information
Sascha Hauer authored and David S. Miller committed Apr 16, 2009
1 parent 344a43c commit f12c377
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: 4f1ceb4b46d523382f5a46622af9d3315a9b3e7f
refs/heads/master: 8549889c3369f7653bd98861c3d2cf97d810dc37
5 changes: 3 additions & 2 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,14 @@ fec_enet_rx(struct net_device *dev)
* include that when passing upstream as it messes up
* bridging applications.
*/
skb = dev_alloc_skb(pkt_len - 4);
skb = dev_alloc_skb(pkt_len - 4 + NET_IP_ALIGN);

if (skb == NULL) {
if (unlikely(!skb)) {
printk("%s: Memory squeeze, dropping packet.\n",
dev->name);
dev->stats.rx_dropped++;
} else {
skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, pkt_len - 4); /* Make room */
skb_copy_to_linear_data(skb, data, pkt_len - 4);
skb->protocol = eth_type_trans(skb, dev);
Expand Down

0 comments on commit f12c377

Please sign in to comment.