]> git.baikalelectronics.ru Git - kernel.git/commitdiff
netfilter: nft_flow_offload: fix underflow in flowtable reference counter
authorwenxu <wenxu@ucloud.cn>
Fri, 20 Dec 2019 09:08:46 +0000 (17:08 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jan 2020 09:06:22 +0000 (10:06 +0100)
The .deactivate and .activate interfaces already deal with the reference
counter. Otherwise, this results in spurious "Device is busy" errors.

Fixes: 0a1cd1f0ee0d ("netfilter: nf_tables: flow offload expression")
Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nft_flow_offload.c

index dd82ff2ee19fef7fe62afcbd1443719075b7df0f..b70b48996801a64e1da3c03792bbfd67350d8c8f 100644 (file)
@@ -200,9 +200,6 @@ static void nft_flow_offload_activate(const struct nft_ctx *ctx,
 static void nft_flow_offload_destroy(const struct nft_ctx *ctx,
                                     const struct nft_expr *expr)
 {
-       struct nft_flow_offload *priv = nft_expr_priv(expr);
-
-       priv->flowtable->use--;
        nf_ct_netns_put(ctx->net, ctx->family);
 }