From: Stanislav Fomichev <sdf@fomichev.me>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, ayush.sawal@chelsio.com,
andrew+netdev@lunn.ch, gregkh@linuxfoundation.org,
horms@kernel.org, dsahern@kernel.org, pablo@netfilter.org,
kadlec@netfilter.org, fw@strlen.de, steffen.klassert@secunet.com,
sdf@fomichev.me, mhal@rbox.co, abhishektamboli9@gmail.com,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
herbert@gondor.apana.org.au
Subject: [PATCH net-next v2 0/7] net: Convert to skb_dstref_steal and skb_dstref_restore
Date: Mon, 18 Aug 2025 08:40:25 -0700 [thread overview]
Message-ID: <20250818154032.3173645-1-sdf@fomichev.me> (raw)
To diagnose and prevent issues similar to [0], emit warning
(CONFIG_DEBUG_NET) from skb_dst_set and skb_dst_set_noref when
overwriting non-null reference-counted entry. Two new helpers
are added to handle special cases where the entry needs to be
reset and restored: skb_dstref_steal/skb_dstref_restore. The bulk of
the patches in the series converts manual _skb_refst manipulations
to these new helpers.
0: https://lore.kernel.org/netdev/20250723224625.1340224-1-sdf@fomichev.me/T/#u
v2:
- rename to skb_dstref_steal/skb_dstref_restore (Jakub)
- fix kdoc (Jakub)
Stanislav Fomichev (7):
net: Add skb_dstref_steal and skb_dstref_restore
xfrm: Switch to skb_dstref_steal to clear dst_entry
netfilter: Switch to skb_dstref_steal to clear dst_entry
net: Switch to skb_dstref_steal/skb_dstref_restore for ip_route_input
callers
staging: octeon: Convert to skb_dst_drop
chtls: Convert to skb_dst_reset
net: Add skb_dst_check_unset
.../chelsio/inline_crypto/chtls/chtls_cm.c | 10 ++---
.../chelsio/inline_crypto/chtls/chtls_cm.h | 4 +-
.../chelsio/inline_crypto/chtls/chtls_io.c | 2 +-
drivers/staging/octeon/ethernet-tx.c | 3 +-
include/linux/skbuff.h | 41 +++++++++++++++++++
net/ipv4/icmp.c | 7 ++--
net/ipv4/ip_options.c | 5 +--
net/ipv4/netfilter.c | 5 ++-
net/ipv6/netfilter.c | 5 ++-
net/xfrm/xfrm_policy.c | 10 ++++-
10 files changed, 72 insertions(+), 20 deletions(-)
--
2.50.1
next reply other threads:[~2025-08-18 15:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 15:40 Stanislav Fomichev [this message]
2025-08-18 15:40 ` [PATCH net-next v2 1/7] net: Add skb_dstref_steal and skb_dstref_restore Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 2/7] xfrm: Switch to skb_dstref_steal to clear dst_entry Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 3/7] netfilter: " Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 4/7] net: Switch to skb_dstref_steal/skb_dstref_restore for ip_route_input callers Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 5/7] staging: octeon: Convert to skb_dst_drop Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 6/7] chtls: Convert to skb_dst_reset Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 7/7] net: Add skb_dst_check_unset Stanislav Fomichev
2025-08-19 15:41 ` [syzbot ci] Re: net: Convert to skb_dstref_steal and skb_dstref_restore syzbot ci
2025-08-20 0:58 ` Jakub Kicinski
2025-08-20 10:45 ` Aleksandr Nogikh
2025-08-20 15:08 ` Jakub Kicinski
2025-08-20 3:11 ` [PATCH net-next v2 0/7] " 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=20250818154032.3173645-1-sdf@fomichev.me \
--to=sdf@fomichev.me \
--cc=abhishektamboli9@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=ayush.sawal@chelsio.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=horms@kernel.org \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mhal@rbox.co \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=steffen.klassert@secunet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).