From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
Willem de Bruijn <willemb@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 1/3] net: allow skb_release_head_state() to be called multiple times
Date: Thu, 6 Nov 2025 20:29:33 +0000 [thread overview]
Message-ID: <20251106202935.1776179-2-edumazet@google.com> (raw)
In-Reply-To: <20251106202935.1776179-1-edumazet@google.com>
Currently, only skb dst is cleared (thanks to skb_dst_drop())
Make sure skb->destructor, conntrack and extensions are cleared.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/skbuff.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5b4bc8b1c7d5674c19b64f8b15685d74632048fe..eeddb9e737ff28e47c77739db7b25ea68e5aa735 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1149,11 +1149,10 @@ void skb_release_head_state(struct sk_buff *skb)
skb);
#endif
+ skb->destructor = NULL;
}
-#if IS_ENABLED(CONFIG_NF_CONNTRACK)
- nf_conntrack_put(skb_nfct(skb));
-#endif
- skb_ext_put(skb);
+ nf_reset_ct(skb);
+ skb_ext_reset(skb);
}
/* Free everything but the sk_buff shell. */
--
2.51.2.1041.gc1ab5b90ca-goog
next prev parent reply other threads:[~2025-11-06 20:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 20:29 [PATCH net-next 0/3] net: use skb_attempt_defer_free() in napi_consume_skb() Eric Dumazet
2025-11-06 20:29 ` Eric Dumazet [this message]
2025-11-07 6:42 ` [PATCH net-next 1/3] net: allow skb_release_head_state() to be called multiple times Kuniyuki Iwashima
2025-11-07 11:23 ` Toke Høiland-Jørgensen
2025-11-06 20:29 ` [PATCH net-next 2/3] net: fix napi_consume_skb() with alien skbs Eric Dumazet
2025-11-07 6:46 ` Kuniyuki Iwashima
2025-11-07 11:23 ` Toke Høiland-Jørgensen
2025-11-07 12:28 ` Eric Dumazet
2025-11-07 14:34 ` Toke Høiland-Jørgensen
2025-11-07 15:44 ` Jason Xing
2025-11-11 16:56 ` Aditya Garg
2025-11-11 17:17 ` Eric Dumazet
2025-11-12 5:14 ` Aditya Garg
2025-11-12 14:03 ` Jon Hunter
2025-11-12 14:08 ` Eric Dumazet
2025-11-12 15:26 ` Jon Hunter
2025-11-12 15:32 ` Eric Dumazet
2026-03-09 21:00 ` Long delay in freeing skbs Tony Battersby
2026-03-09 21:07 ` Eric Dumazet
2026-03-09 21:18 ` Tony Battersby
2026-03-09 21:24 ` Eric Dumazet
2026-03-09 21:47 ` Tony Battersby
2026-03-10 14:49 ` Tony Battersby
2026-03-10 15:25 ` Eric Dumazet
2025-11-06 20:29 ` [PATCH net-next 3/3] net: increase skb_defer_max default to 128 Eric Dumazet
2025-11-07 6:47 ` Kuniyuki Iwashima
2025-11-07 11:23 ` Toke Høiland-Jørgensen
2025-11-07 15:37 ` Jason Xing
2025-11-07 15:47 ` Eric Dumazet
2025-11-07 15:49 ` Jason Xing
2025-11-07 16:00 ` Eric Dumazet
2025-11-07 16:03 ` Jason Xing
2025-11-07 16:08 ` Eric Dumazet
2025-11-07 16:20 ` Jason Xing
2025-11-07 16:26 ` Eric Dumazet
2025-11-07 16:59 ` Jason Xing
2025-11-08 3:10 ` [PATCH net-next 0/3] net: use skb_attempt_defer_free() in napi_consume_skb() patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251106202935.1776179-2-edumazet@google.com \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.