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_dst_reset/skb_dst_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@xxxxxxxxxxx/T/#u Stanislav Fomichev (7): net: Add skb_dst_reset and skb_dst_restore xfrm: Switch to skb_dst_reset to clear dst_entry netfilter: Switch to skb_dst_reset to clear dst_entry net: Switch to skb_dst_reset/skb_dst_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 | 40 +++++++++++++++++++ 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, 71 insertions(+), 20 deletions(-) -- 2.50.1