netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, vasily.averin@linux.dev
Subject: Re: [PATCH nf,v2] netfilter: nf_tables: missing objects with no memcg accounting
Date: Thu, 19 Sep 2024 13:59:41 +0200	[thread overview]
Message-ID: <ZuwSLa1e1bAsgOVb@calendula> (raw)
In-Reply-To: <20240918132030.GC16721@breakpoint.cc>

On Wed, Sep 18, 2024 at 03:20:30PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > v2: a more complete version.
> 
> Thanks Pablo, LGTM.  One nit below.
> > diff --git a/net/netfilter/nft_log.c b/net/netfilter/nft_log.c
> > index 5defe6e4fd98..e35588137995 100644
> > --- a/net/netfilter/nft_log.c
> > +++ b/net/netfilter/nft_log.c
> > @@ -163,7 +163,7 @@ static int nft_log_init(const struct nft_ctx *ctx,
> >  
> >  	nla = tb[NFTA_LOG_PREFIX];
> >  	if (nla != NULL) {
> > -		priv->prefix = kmalloc(nla_len(nla) + 1, GFP_KERNEL);
> > +		priv->prefix = kmalloc(nla_len(nla) + 1, GFP_KERNEL_ACCOUNT);
> >  		if (priv->prefix == NULL)
> >  			return -ENOMEM;
> >  		nla_strscpy(priv->prefix, nla, nla_len(nla) + 1);
> 
> You could update this to use nla_strdup instead of kmalloc+strscpy.
> 
> No need to send a v3 for this I think.

Thanks for reviewing, I promise to address this in nf-next.

      reply	other threads:[~2024-09-19 11:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 12:19 [PATCH nf,v2] netfilter: nf_tables: missing objects with no memcg accounting Pablo Neira Ayuso
2024-09-18 13:20 ` Florian Westphal
2024-09-19 11:59   ` Pablo Neira Ayuso [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=ZuwSLa1e1bAsgOVb@calendula \
    --to=pablo@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=vasily.averin@linux.dev \
    /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).