mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: allow skb_release_head_state() to be called multiple times
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> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20251106202935.1776179-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
fd9557c360
commit
1fcf572211
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user