netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Fernando F. Mancera" <ffmancera@riseup.net>
To: Yang Yingliang <yangyingliang@huawei.com>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org
Cc: pablo@netfilter.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: Tue, 24 Jan 2023 14:16:55 +0100	[thread overview]
Message-ID: <f9e39f74-e204-dcba-03ce-dfce7fe37a6d@riseup.net> (raw)
In-Reply-To: <20230119075125.3598627-1-yangyingliang@huawei.com>



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>

  parent reply	other threads:[~2023-01-24 13: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 [this message]
2023-02-01 11:17   ` 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=f9e39f74-e204-dcba-03ce-dfce7fe37a6d@riseup.net \
    --to=ffmancera@riseup.net \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --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=pablo@netfilter.org \
    --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).