diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-08-28 19:19:37 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-29 17:18:31 -0400 |
commit | 83c758fabd3589842ebcb3af6b9150ff55bc39aa (patch) | |
tree | 27a0f8a772d9552815b38eafb6f7ccd19b13d859 /drivers/net/skge.c | |
parent | 78bc218663e3bd6cbbaf6a363d2f88f17541adfb (diff) |
[PATCH] skge: use dev_alloc_skb
To avoid problems with buggy protocols that assume extra header space,
use dev_alloc_skb() when allocating receive buffers.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c index 85296ba5eac2..e38b178769c2 100644 --- a/drivers/net/skge.c +++ b/drivers/net/skge.c | |||
@@ -827,7 +827,8 @@ static int skge_rx_fill(struct skge_port *skge) | |||
827 | do { | 827 | do { |
828 | struct sk_buff *skb; | 828 | struct sk_buff *skb; |
829 | 829 | ||
830 | skb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_KERNEL); | 830 | skb = __dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, |
831 | GFP_KERNEL); | ||
831 | if (!skb) | 832 | if (!skb) |
832 | return -ENOMEM; | 833 | return -ENOMEM; |
833 | 834 | ||
@@ -2609,7 +2610,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge, | |||
2609 | goto error; | 2610 | goto error; |
2610 | 2611 | ||
2611 | if (len < RX_COPY_THRESHOLD) { | 2612 | if (len < RX_COPY_THRESHOLD) { |
2612 | skb = alloc_skb(len + 2, GFP_ATOMIC); | 2613 | skb = dev_alloc_skb(len + 2); |
2613 | if (!skb) | 2614 | if (!skb) |
2614 | goto resubmit; | 2615 | goto resubmit; |
2615 | 2616 | ||
@@ -2624,7 +2625,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge, | |||
2624 | skge_rx_reuse(e, skge->rx_buf_size); | 2625 | skge_rx_reuse(e, skge->rx_buf_size); |
2625 | } else { | 2626 | } else { |
2626 | struct sk_buff *nskb; | 2627 | struct sk_buff *nskb; |
2627 | nskb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_ATOMIC); | 2628 | nskb = dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN); |
2628 | if (!nskb) | 2629 | if (!nskb) |
2629 | goto resubmit; | 2630 | goto resubmit; |
2630 | 2631 | ||