sk_buff: drop all skb extensions on free and skb scrubbing
authorFlorian Westphal <fw@strlen.de>
Thu, 26 Sep 2019 18:37:05 +0000 (20:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 18:40:19 +0000 (20:40 +0200)
commit174e23810cd3183dc2ca3f5166ef965a55eaaf54
treea9ffbf41f4c75ccef3332330253b37e21a84104f
parent6b3656a60f2067738d1a423328199720806f0c44
sk_buff: drop all skb extensions on free and skb scrubbing

Now that we have a 3rd extension, add a new helper that drops the
extension space and use it when we need to scrub an sk_buff.

At this time, scrubbing clears secpath and bridge netfilter data, but
retains the tc skb extension, after this patch all three get cleared.

NAPI reuse/free assumes we can only have a secpath attached to skb, but
it seems better to clear all extensions there as well.

v2: add unlikely hint (Eric Dumazet)

Fixes: 95a7233c452a ("net: openvswitch: Set OvS recirc_id from tc chain index")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/dev.c
net/core/skbuff.c