netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v2 nft] src: add and use refcount assert helper
Date: Tue, 21 Oct 2025 00:22:19 +0200	[thread overview]
Message-ID: <aPa2G3AIYYR63RfQ@strlen.de> (raw)
In-Reply-To: <aPaywVyKhzUuj8Mn@calendula>

Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > +static inline void assert_refcount_safe(unsigned int ref)
> > +{
> > +	assert(ref > 0);
> > +	assert(ref < INT_MAX);
> 
> Will this point to the right file and line when the assertion is hit?

No, I meant for this to be used with gdb+coredump.

> IIRC we have to use a macro here?

If you think that is preferrable then I can do that, in that case
it would propably also make sense to use BUG() macro instead
of plain assert?

      reply	other threads:[~2025-10-20 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20  7:29 [PATCH v2 nft] src: add and use refcount assert helper Florian Westphal
2025-10-20 22:08 ` Pablo Neira Ayuso
2025-10-20 22:22   ` 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=aPa2G3AIYYR63RfQ@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 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).