diff options
author | Yan Zhai <yan@cloudflare.com> | 2024-06-17 20:09:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-19 13:44:22 +0200 |
commit | ce9a2424e9da2cd4e790f2498621bc2aa5e5d298 (patch) | |
tree | 1ae6c65227db459ba9817b817d3c7f0b35f213b6 /net/ipv4 | |
parent | ping: use sk_skb_reason_drop to free rx packets (diff) | |
download | linux-ce9a2424e9da2cd4e790f2498621bc2aa5e5d298.tar.xz linux-ce9a2424e9da2cd4e790f2498621bc2aa5e5d298.zip |
net: raw: 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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 1a0953650356..474dfd263c8b 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -301,7 +301,7 @@ static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb) ipv4_pktinfo_prepare(sk, skb, true); if (sock_queue_rcv_skb_reason(sk, skb, &reason) < 0) { - kfree_skb_reason(skb, reason); + sk_skb_reason_drop(sk, skb, reason); return NET_RX_DROP; } @@ -312,7 +312,7 @@ int raw_rcv(struct sock *sk, struct sk_buff *skb) { if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) { atomic_inc(&sk->sk_drops); - kfree_skb_reason(skb, SKB_DROP_REASON_XFRM_POLICY); + sk_skb_reason_drop(sk, skb, SKB_DROP_REASON_XFRM_POLICY); return NET_RX_DROP; } nf_reset_ct(skb); |