]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: Switch to skb_dstref_steal/skb_dstref_restore for ip_route_input callers
authorStanislav Fomichev <sdf@fomichev.me>
Mon, 18 Aug 2025 15:40:29 +0000 (08:40 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 20 Aug 2025 00:54:35 +0000 (17:54 -0700)
commite97e6a1830ddb5885ba312e56b6fa3aa39b5f47e
treea24682011873ec329680d81302f72adacbbe97ad
parent15488d4d8dc10a575f32cc692b6c9aa99f66bc7b
net: Switch to skb_dstref_steal/skb_dstref_restore for ip_route_input callers

Going forward skb_dst_set will assert that skb dst_entry
is empty during skb_dst_set. skb_dstref_steal is added to reset
existing entry without doing refcnt. skb_dstref_restore should
be used to restore the previous entry. Convert icmp_route_lookup
and ip_options_rcv_srr to these helpers. Add extra call to
skb_dstref_reset to icmp_route_lookup to clear the ip_route_input
entry.

Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250818154032.3173645-5-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/icmp.c
net/ipv4/ip_options.c