]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb71f1fd1a0f44b200cb4706cdccf8d69428abd0d
treea9ffbf41f4c75ccef3332330253b37e21a84104f
parent654660076fbb7a50d71f9a3f6deceea85d425c3a
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: 82250824f0d3 ("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