mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
net: use consume_skb() in place of kfree_skb()
Remove some dropwatch/drop_monitor false positives. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
4aea39c11c
commit
5d0ba55b64
7 changed files with 14 additions and 12 deletions
|
|
@ -231,9 +231,11 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
|
|||
if (skb_headroom(skb) < 2) {
|
||||
pr_debug("reallocating skb\n");
|
||||
skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
|
||||
kfree_skb(skb);
|
||||
if (skb2 == NULL)
|
||||
if (unlikely(!skb2)) {
|
||||
kfree_skb(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
consume_skb(skb);
|
||||
skb = skb2;
|
||||
}
|
||||
skb_push(skb, 2);
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ static int pppoatm_send(struct ppp_channel *chan, struct sk_buff *skb)
|
|||
kfree_skb(n);
|
||||
goto nospace;
|
||||
}
|
||||
kfree_skb(skb);
|
||||
consume_skb(skb);
|
||||
skb = n;
|
||||
if (skb == NULL)
|
||||
return DROP_PACKET;
|
||||
|
|
|
|||
Loading…
Reference in a new issue