Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: skbuff: don't zero tc members when freeing skb

Not needed, only four cases:
- kfree_skb (or one of its aliases).
Don't need to zero, memory will be freed.
- kfree_skb_partial and head was stolen: memory will be freed.
- skb_morph: The skb header fields (including tc ones) will be
copied over from the 'to-be-morphed' skb right after
skb_release_head_state returns.
- skb_segment: Same as before, all the skb header
fields are copied over from the original skb right away.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Westphal and committed by
David S. Miller
e8768f97 6c032edc

-7
-7
net/core/skbuff.c
··· 677 677 #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) 678 678 nf_bridge_put(skb->nf_bridge); 679 679 #endif 680 - /* XXX: IS this still necessary? - JHS */ 681 - #ifdef CONFIG_NET_SCHED 682 - skb->tc_index = 0; 683 - #ifdef CONFIG_NET_CLS_ACT 684 - skb->tc_verd = 0; 685 - #endif 686 - #endif 687 680 } 688 681 689 682 /* Free everything but the sk_buff shell. */