All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 2/9] netfilter: nft_flow_offload: fix underflow in flowtable reference counter
Date: Thu,  9 Jan 2020 00:17:06 +0100	[thread overview]
Message-ID: <20200108231713.100458-3-pablo@netfilter.org> (raw)
In-Reply-To: <20200108231713.100458-1-pablo@netfilter.org>

From: wenxu <wenxu@ucloud.cn>

The .deactivate and .activate interfaces already deal with the reference
counter. Otherwise, this results in spurious "Device is busy" errors.

Fixes: a3c90f7a2323 ("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 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c
index dd82ff2ee19f..b70b48996801 100644
--- a/net/netfilter/nft_flow_offload.c
+++ b/net/netfilter/nft_flow_offload.c
@@ -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);
 }
 
-- 
2.11.0


  parent reply	other threads:[~2020-01-08 23:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 23:17 [PATCH 0/9] Netfilter fixes for net Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 1/9] netfilter: arp_tables: init netns pointer in xt_tgchk_param struct Pablo Neira Ayuso
2020-01-08 23:17 ` Pablo Neira Ayuso [this message]
2020-01-08 23:17 ` [PATCH 3/9] netfilter: nf_flow_table_offload: fix incorrect ethernet dst address Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 4/9] netfilter: nf_flow_table_offload: check the status of dst_neigh Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 5/9] netfilter: nf_flow_table_offload: fix the nat port mangle Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 6/9] netfilter: nf_tables: unbind callbacks from flowtable destroy path Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 7/9] netfilter: flowtable: add nf_flowtable_time_stamp Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 8/9] netfilter: conntrack: dccp, sctp: handle null timeout argument Pablo Neira Ayuso
2020-01-08 23:17 ` [PATCH 9/9] netfilter: ipset: avoid null deref when IPSET_ATTR_LINENO is present Pablo Neira Ayuso
2020-01-08 23:22 ` [PATCH 0/9] Netfilter fixes for net David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200108231713.100458-3-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.