aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-06-03 21:17:19 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-04 11:27:40 -0400
commit5d0ba55b6486f58cc890918d7167063d83f7fbb4 (patch)
tree9f9a59cc9fc9d31d7e557c7688a054f8fea8a6ab /net/atm
parent4aea39c11c610e411768649fdc04777903ebfe07 (diff)
net: use consume_skb() in place of kfree_skb()
Remove some dropwatch/drop_monitor false positives. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/lec.c6
-rw-r--r--net/atm/pppoatm.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index a7d172105c99..3da125c384ea 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -231,9 +231,11 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
231 if (skb_headroom(skb) < 2) { 231 if (skb_headroom(skb) < 2) {
232 pr_debug("reallocating skb\n"); 232 pr_debug("reallocating skb\n");
233 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN); 233 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
234 kfree_skb(skb); 234 if (unlikely(!skb2)) {
235 if (skb2 == NULL) 235 kfree_skb(skb);
236 return NETDEV_TX_OK; 236 return NETDEV_TX_OK;
237 }
238 consume_skb(skb);
237 skb = skb2; 239 skb = skb2;
238 } 240 }
239 skb_push(skb, 2); 241 skb_push(skb, 2);
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index ce1e59fdae7b..226dca989448 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -283,7 +283,7 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
283 kfree_skb(n); 283 kfree_skb(n);
284 goto nospace; 284 goto nospace;
285 } 285 }
286 kfree_skb(skb); 286 consume_skb(skb);
287 skb = n; 287 skb = n;
288 if (skb == NULL) 288 if (skb == NULL)
289 return DROP_PACKET; 289 return DROP_PACKET;