]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ping: use sk_skb_reason_drop to free rx packets
authorYan Zhai <yan@cloudflare.com>
Mon, 17 Jun 2024 18:09:13 +0000 (11:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Jun 2024 11:44:22 +0000 (12:44 +0100)
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>
net/ipv4/ping.c

index 823306487a8219ee76e934a2a84050c0f292c046..619ddc087957fa7939195f410852b1d6c051d7ae 100644 (file)
@@ -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;
        }