linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] net: Convert to skb_dstref_steal and skb_dstref_restore
@ 2025-08-18 15:40 Stanislav Fomichev
  2025-08-18 15:40 ` [PATCH net-next v2 1/7] net: Add " Stanislav Fomichev
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Stanislav Fomichev @ 2025-08-18 15:40 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, ayush.sawal, andrew+netdev, gregkh,
	horms, dsahern, pablo, kadlec, fw, steffen.klassert, sdf, mhal,
	abhishektamboli9, linux-kernel, linux-staging, netfilter-devel,
	coreteam, herbert

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-08-20 15:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 15:40 [PATCH net-next v2 0/7] net: Convert to skb_dstref_steal and skb_dstref_restore Stanislav Fomichev
2025-08-18 15:40 ` [PATCH net-next v2 1/7] net: Add " 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

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).