Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Eric Dumazet and committed by
Jakub Kicinski
b02c1230 d3ca2ef0

+2 -2
+1 -1
net/ipv4/tcp_output.c
··· 1586 1586 err = tcp_ao_transmit_skb(sk, skb, key.ao_key, th, 1587 1587 opts.hash_location); 1588 1588 if (err) { 1589 - kfree_skb_reason(skb, SKB_DROP_REASON_NOT_SPECIFIED); 1589 + sk_skb_reason_drop(sk, skb, SKB_DROP_REASON_NOT_SPECIFIED); 1590 1590 return -ENOMEM; 1591 1591 } 1592 1592 }
+1 -1
net/psp/psp_sock.c
··· 37 37 good = !pas || rcu_access_pointer(dev->psp_dev) == pas->psd; 38 38 rcu_read_unlock(); 39 39 if (!good) { 40 - kfree_skb_reason(skb, SKB_DROP_REASON_PSP_OUTPUT); 40 + sk_skb_reason_drop(sk, skb, SKB_DROP_REASON_PSP_OUTPUT); 41 41 return NULL; 42 42 } 43 43