mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-14 10:19:08 +08:00
tcp: prefer sk_skb_reason_drop()
Replace two calls to kfree_skb_reason() with sk_skb_reason_drop(). Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Daniel Zahka <daniel.zahka@gmail.com> Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20250918132007.325299-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
d3ca2ef0c9
commit
b02c123010
@@ -1586,7 +1586,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
|
||||
err = tcp_ao_transmit_skb(sk, skb, key.ao_key, th,
|
||||
opts.hash_location);
|
||||
if (err) {
|
||||
kfree_skb_reason(skb, SKB_DROP_REASON_NOT_SPECIFIED);
|
||||
sk_skb_reason_drop(sk, skb, SKB_DROP_REASON_NOT_SPECIFIED);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ psp_validate_xmit(struct sock *sk, struct net_device *dev, struct sk_buff *skb)
|
||||
good = !pas || rcu_access_pointer(dev->psp_dev) == pas->psd;
|
||||
rcu_read_unlock();
|
||||
if (!good) {
|
||||
kfree_skb_reason(skb, SKB_DROP_REASON_PSP_OUTPUT);
|
||||
sk_skb_reason_drop(sk, skb, SKB_DROP_REASON_PSP_OUTPUT);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user