Skip to content

Commit

Permalink
net: skbuff: don't zero tc members when freeing skb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Jan 2, 2015
1 parent 6c032ed commit e8768f9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,6 @@ static void skb_release_head_state(struct sk_buff *skb)
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
nf_bridge_put(skb->nf_bridge);
#endif
/* XXX: IS this still necessary? - JHS */
#ifdef CONFIG_NET_SCHED
skb->tc_index = 0;
#ifdef CONFIG_NET_CLS_ACT
skb->tc_verd = 0;
#endif
#endif
}

/* Free everything but the sk_buff shell. */
Expand Down

0 comments on commit e8768f9

Please sign in to comment.