diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-03-04 09:00:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-03-04 15:17:11 +0300 |
commit | 7e726ed81e1ddd5fdc431e02b94fcfe2a9876d42 (patch) | |
tree | b69798c8c8bbaa44e80274bc0637446770dc7d3f /net/core | |
parent | 44f0bd40803c0e04f1c8cd59df3c7acce783ae9c (diff) | |
download | linux-7e726ed81e1ddd5fdc431e02b94fcfe2a9876d42.tar.xz |
net: dev: use kfree_skb_reason() for do_xdp_generic()
Replace kfree_skb() used in do_xdp_generic() with kfree_skb_reason().
The drop reason SKB_DROP_REASON_XDP is introduced for this case.
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 460ac941a631..f449834a63df 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4825,7 +4825,7 @@ int do_xdp_generic(struct bpf_prog *xdp_prog, struct sk_buff *skb) } return XDP_PASS; out_redir: - kfree_skb(skb); + kfree_skb_reason(skb, SKB_DROP_REASON_XDP); return XDP_DROP; } EXPORT_SYMBOL_GPL(do_xdp_generic); |