Commit 0c3d5a96 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

net: drivers/net: Remove unnecessary skb_copy_expand OOM messages

skb_copy_expand without __GFP_NOWARN already does a dump_stack
on OOM so these messages are redundant.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80d9f3a0
...@@ -705,7 +705,6 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -705,7 +705,6 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
tskb = skb_copy_expand(skb, QCAFRM_HEADER_LEN, tskb = skb_copy_expand(skb, QCAFRM_HEADER_LEN,
QCAFRM_FOOTER_LEN + pad_len, GFP_ATOMIC); QCAFRM_FOOTER_LEN + pad_len, GFP_ATOMIC);
if (!tskb) { if (!tskb) {
netdev_dbg(qca->net_dev, "could not allocate tx_buff\n");
qca->stats.out_of_mem++; qca->stats.out_of_mem++;
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
......
...@@ -157,12 +157,8 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -157,12 +157,8 @@ static int vl600_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
s->current_rx_buf = skb_copy_expand(skb, 0, s->current_rx_buf = skb_copy_expand(skb, 0,
le32_to_cpup(&frame->len), GFP_ATOMIC); le32_to_cpup(&frame->len), GFP_ATOMIC);
if (!s->current_rx_buf) { if (!s->current_rx_buf)
netif_err(dev, ifup, dev->net, "Reserving %i bytes "
"for packet assembly failed.\n",
le32_to_cpup(&frame->len));
dev->net->stats.rx_errors++; dev->net->stats.rx_errors++;
}
return 0; return 0;
} }
......
...@@ -263,9 +263,6 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb) ...@@ -263,9 +263,6 @@ struct sk_buff *i2400mu_rx(struct i2400mu *i2400mu, struct sk_buff *rx_skb)
new_skb = skb_copy_expand(rx_skb, 0, rx_size - rx_skb->len, new_skb = skb_copy_expand(rx_skb, 0, rx_size - rx_skb->len,
GFP_KERNEL); GFP_KERNEL);
if (new_skb == NULL) { if (new_skb == NULL) {
if (printk_ratelimit())
dev_err(dev, "RX: Can't reallocate skb to %d; "
"RX dropped\n", rx_size);
kfree_skb(rx_skb); kfree_skb(rx_skb);
rx_skb = NULL; rx_skb = NULL;
goto out; /* drop it...*/ goto out; /* drop it...*/
......
...@@ -221,10 +221,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, ...@@ -221,10 +221,8 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb,
struct sk_buff *newskb = skb_copy_expand(skb, 0, 3, struct sk_buff *newskb = skb_copy_expand(skb, 0, 3,
GFP_KERNEL); GFP_KERNEL);
if (unlikely(newskb == NULL)) { if (unlikely(newskb == NULL))
wl1251_error("Can't allocate skb!");
return -EINVAL; return -EINVAL;
}
tx_hdr = (struct tx_double_buffer_desc *) newskb->data; tx_hdr = (struct tx_double_buffer_desc *) newskb->data;
......
...@@ -507,7 +507,6 @@ static int eem_unwrap(struct gether *port, ...@@ -507,7 +507,6 @@ static int eem_unwrap(struct gether *port,
0, 0,
GFP_ATOMIC); GFP_ATOMIC);
if (unlikely(!skb3)) { if (unlikely(!skb3)) {
DBG(cdev, "unable to realign EEM packet\n");
dev_kfree_skb_any(skb2); dev_kfree_skb_any(skb2);
continue; continue;
} }
......
...@@ -2549,11 +2549,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) ...@@ -2549,11 +2549,8 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
fwd_skb = skb_copy_expand(skb, local->tx_headroom + fwd_skb = skb_copy_expand(skb, local->tx_headroom +
sdata->encrypt_headroom, 0, GFP_ATOMIC); sdata->encrypt_headroom, 0, GFP_ATOMIC);
if (!fwd_skb) { if (!fwd_skb)
net_info_ratelimited("%s: failed to clone mesh frame\n",
sdata->name);
goto out; goto out;
}
fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data; fwd_hdr = (struct ieee80211_hdr *) fwd_skb->data;
fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY); fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY);
......
...@@ -833,11 +833,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff) ...@@ -833,11 +833,8 @@ nfqnl_mangle(void *data, int data_len, struct nf_queue_entry *e, int diff)
if (diff > skb_tailroom(e->skb)) { if (diff > skb_tailroom(e->skb)) {
nskb = skb_copy_expand(e->skb, skb_headroom(e->skb), nskb = skb_copy_expand(e->skb, skb_headroom(e->skb),
diff, GFP_ATOMIC); diff, GFP_ATOMIC);
if (!nskb) { if (!nskb)
printk(KERN_WARNING "nf_queue: OOM "
"in mangle, dropping packet\n");
return -ENOMEM; return -ENOMEM;
}
kfree_skb(e->skb); kfree_skb(e->skb);
e->skb = nskb; e->skb = nskb;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment