mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
ping: use sk_skb_reason_drop to free rx packets
Replace kfree_skb_reason with sk_skb_reason_drop and pass the receiving socket to the tracepoint. Signed-off-by: Yan Zhai <yan@cloudflare.com> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ba8de796ba
commit
7467de1763
@ -946,7 +946,7 @@ static enum skb_drop_reason __ping_queue_rcv_skb(struct sock *sk,
|
||||
pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n",
|
||||
inet_sk(sk), inet_sk(sk)->inet_num, skb);
|
||||
if (sock_queue_rcv_skb_reason(sk, skb, &reason) < 0) {
|
||||
kfree_skb_reason(skb, reason);
|
||||
sk_skb_reason_drop(sk, skb, reason);
|
||||
pr_debug("ping_queue_rcv_skb -> failed\n");
|
||||
return reason;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user