aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2024-10-10 17:48:15 +0000
committerJakub Kicinski <[email protected]>2024-10-15 00:39:36 +0000
commit5ced52fa8f0dc23adb067f7b8a009a5ee051efb7 (patch)
treef9c567b91223fee5b5af62f82d8fa5846600a996 /net/ipv4/tcp_output.c
parentnet_sched: sch_fq: prepare for TIME_WAIT sockets (diff)
downloadkernel-5ced52fa8f0dc23adb067f7b8a009a5ee051efb7.tar.gz
kernel-5ced52fa8f0dc23adb067f7b8a009a5ee051efb7.zip
net: add skb_set_owner_edemux() helper
This can be used to attach a socket to an skb, taking a reference on sk->sk_refcnt. This helper might be a NOP if sk->sk_refcnt is zero. Use it from tcp_make_synack(). Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Brian Vazquez <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 06200bb111f8..054244ce5117 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -3728,7 +3728,7 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
switch (synack_type) {
case TCP_SYNACK_NORMAL:
- skb_set_owner_w(skb, req_to_sk(req));
+ skb_set_owner_edemux(skb, req_to_sk(req));
break;
case TCP_SYNACK_COOKIE:
/* Under synflood, we do not attach skb to a socket,