From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] src: add refcount asserts
Date: Sun, 19 Oct 2025 22:57:29 +0200 [thread overview]
Message-ID: <aPVQqfithTx_FMyY@strlen.de> (raw)
In-Reply-To: <aPVMzW-DOPo9JISv@calendula>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > @@ -343,11 +352,14 @@ static void variable_expr_clone(struct expr *new, const struct expr *expr)
> > new->scope = expr->scope;
> > new->sym = expr->sym;
> >
> > + assert(expr->sym->refcnt > 0);
> > + assert(expr->sym->refcnt < UINT_MAX);
>
> Would it be possible to consolidate all this with a macro, eg.
>
> assert_refcount_safe(expr->sym->refcnt);
Sure, makes sense to me, I'll spin a v2.
prev parent reply other threads:[~2025-10-19 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 8:13 [PATCH nft] src: add refcount asserts Florian Westphal
2025-10-19 20:40 ` Pablo Neira Ayuso
2025-10-19 20:57 ` Florian Westphal [this message]
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=aPVQqfithTx_FMyY@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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.