Skip to content

Commit fed5ea2

Browse files
committed
ping: use sk_skb_reason_drop to free rx packets
JIRA: https://issues.redhat.com/browse/RHEL-48648 Upstream Status: net-next.git commit 7467de1 Author: Yan Zhai <yan@cloudflare.com> Date: Mon Jun 17 11:09:13 2024 -0700 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> Signed-off-by: Antoine Tenart <atenart@redhat.com>
1 parent a8e32bb commit fed5ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/ping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static enum skb_drop_reason __ping_queue_rcv_skb(struct sock *sk,
963963
pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n",
964964
inet_sk(sk), inet_sk(sk)->inet_num, skb);
965965
if (sock_queue_rcv_skb_reason(sk, skb, &reason) < 0) {
966-
kfree_skb_reason(skb, reason);
966+
sk_skb_reason_drop(sk, skb, reason);
967967
pr_debug("ping_queue_rcv_skb -> failed\n");
968968
return reason;
969969
}

0 commit comments

Comments
 (0)