mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08: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",
|
pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n",
|
||||||
inet_sk(sk), inet_sk(sk)->inet_num, skb);
|
inet_sk(sk), inet_sk(sk)->inet_num, skb);
|
||||||
if (sock_queue_rcv_skb_reason(sk, skb, &reason) < 0) {
|
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");
|
pr_debug("ping_queue_rcv_skb -> failed\n");
|
||||||
return reason;
|
return reason;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user