summaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-08-28 16:19:37 -0700
committerJeff Garzik <jeff@garzik.org>2006-08-29 17:18:31 -0400
commit83c758fabd3589842ebcb3af6b9150ff55bc39aa (patch)
tree27a0f8a772d9552815b38eafb6f7ccd19b13d859 /drivers/net/skge.c
parent78bc218663e3bd6cbbaf6a363d2f88f17541adfb (diff)
downloadtalos-obmc-linux-83c758fabd3589842ebcb3af6b9150ff55bc39aa.tar.gz
talos-obmc-linux-83c758fabd3589842ebcb3af6b9150ff55bc39aa.zip
[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.c7
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)
do {
struct sk_buff *skb;
- skb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_KERNEL);
+ skb = __dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN,
+ GFP_KERNEL);
if (!skb)
return -ENOMEM;
@@ -2609,7 +2610,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge,
goto error;
if (len < RX_COPY_THRESHOLD) {
- skb = alloc_skb(len + 2, GFP_ATOMIC);
+ skb = dev_alloc_skb(len + 2);
if (!skb)
goto resubmit;
@@ -2624,7 +2625,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge,
skge_rx_reuse(e, skge->rx_buf_size);
} else {
struct sk_buff *nskb;
- nskb = alloc_skb(skge->rx_buf_size + NET_IP_ALIGN, GFP_ATOMIC);
+ nskb = dev_alloc_skb(skge->rx_buf_size + NET_IP_ALIGN);
if (!nskb)
goto resubmit;
OpenPOWER on IntegriCloud