netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Fernando F. Mancera" <ffmancera@riseup.net>
Cc: Yang Yingliang <yangyingliang@huawei.com>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, kadlec@netfilter.org, fw@strlen.de,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com
Subject: Re: [PATCH net-next] netfilter: nf_tables: fix wrong pointer passed to PTR_ERR()
Date: Wed, 1 Feb 2023 12:17:20 +0100	[thread overview]
Message-ID: <Y9pKQO3E3K6tD0bI@salvia> (raw)
In-Reply-To: <f9e39f74-e204-dcba-03ce-dfce7fe37a6d@riseup.net>

On Tue, Jan 24, 2023 at 02:16:55PM +0100, Fernando F. Mancera wrote:
> 
> 
> On 19/01/2023 08:51, Yang Yingliang wrote:
> > It should be 'chain' passed to PTR_ERR() in the error path
> > after calling nft_chain_lookup() in nf_tables_delrule().
> > 
> > Fixes: f80a612dd77c ("netfilter: nf_tables: add support to destroy operation")
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> > ---
> >   net/netfilter/nf_tables_api.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> > index 974b95dece1d..10264e98978b 100644
> > --- a/net/netfilter/nf_tables_api.c
> > +++ b/net/netfilter/nf_tables_api.c
> > @@ -3724,7 +3724,7 @@ static int nf_tables_delrule(struct sk_buff *skb, const struct nfnl_info *info,
> >   		chain = nft_chain_lookup(net, table, nla[NFTA_RULE_CHAIN],
> >   					 genmask);
> >   		if (IS_ERR(chain)) {
> > -			if (PTR_ERR(rule) == -ENOENT &&
> > +			if (PTR_ERR(chain) == -ENOENT &&
> >   			    NFNL_MSG_TYPE(info->nlh->nlmsg_type) == NFT_MSG_DESTROYRULE)
> >   				return 0;
> 
> Acked-by: Fernando Fernandez Mancera <ffmancera@riseup.net>

Applied, thanks


      reply	other threads:[~2023-02-01 11:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19  7:51 [PATCH net-next] netfilter: nf_tables: fix wrong pointer passed to PTR_ERR() Yang Yingliang
2023-01-22 16:12 ` Simon Horman
2023-01-24 13:16 ` Fernando F. Mancera
2023-02-01 11:17   ` 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=Y9pKQO3E3K6tD0bI@salvia \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ffmancera@riseup.net \
    --cc=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yangyingliang@huawei.com \
    /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).