From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nf-next 5/6] netfilter: nft_rbtree: check for next generation when deactivating elements
Date: Wed, 22 Jun 2016 13:14:31 +0200 [thread overview]
Message-ID: <1466594072-24043-5-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1466594072-24043-1-git-send-email-pablo@netfilter.org>
set->ops->deactivate() is invoked from nft_del_setelem() that happens
from the transaction path, so we have to check if the object is active
in the next generation, not the current.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nft_rbtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nft_rbtree.c b/net/netfilter/nft_rbtree.c
index 7201d57..c0f6387 100644
--- a/net/netfilter/nft_rbtree.c
+++ b/net/netfilter/nft_rbtree.c
@@ -170,7 +170,7 @@ static void *nft_rbtree_deactivate(const struct nft_set *set,
const struct nft_rbtree *priv = nft_set_priv(set);
const struct rb_node *parent = priv->root.rb_node;
struct nft_rbtree_elem *rbe, *this = elem->priv;
- u8 genmask = nft_genmask_cur(read_pnet(&set->pnet));
+ u8 genmask = nft_genmask_next(read_pnet(&set->pnet));
int d;
while (parent != NULL) {
--
2.1.4
next prev parent reply other threads:[~2016-06-22 11:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 11:14 [PATCH nf-next 1/6] netfilter: nf_tables: add generic macros to check for generation mask Pablo Neira Ayuso
2016-06-22 11:14 ` [PATCH nf-next 2/6] netfilter: nf_tables: add generation mask to tables Pablo Neira Ayuso
2016-06-22 11:50 ` Pablo Neira Ayuso
2016-06-22 11:14 ` [PATCH nf-next 3/6] netfilter: nf_tables: add generation mask to chains Pablo Neira Ayuso
2016-06-22 11:14 ` [PATCH nf-next 4/6] netfilter: nf_tables: add generation mask to sets Pablo Neira Ayuso
2016-06-22 11:14 ` Pablo Neira Ayuso [this message]
2016-06-22 11:14 ` [PATCH nf-next 6/6] netfilter: nft_hash: support deletion of inactive elements Pablo Neira Ayuso
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=1466594072-24043-5-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).