Skip to content

Commit 7467de1

Browse files
Yan Zhaidavem330
authored andcommitted
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>
1 parent ba8de79 commit 7467de1

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
@@ -946,7 +946,7 @@ static enum skb_drop_reason __ping_queue_rcv_skb(struct sock *sk,
946946
pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n",
947947
inet_sk(sk), inet_sk(sk)->inet_num, skb);
948948
if (sock_queue_rcv_skb_reason(sk, skb, &reason) < 0) {
949-
kfree_skb_reason(skb, reason);
949+
sk_skb_reason_drop(sk, skb, reason);
950950
pr_debug("ping_queue_rcv_skb -> failed\n");
951951
return reason;
952952
}

0 commit comments

Comments
 (0)