linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Hillf Danton <hdanton@sina.com>
Cc: syzbot <syzbot+33e06702fd6cffc24c40@syzkaller.appspotmail.com>,
	coreteam@netfilter.org, davem@davemloft.net, fw@strlen.de,
	kadlec@netfilter.org, kuba@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, pablo@netfilter.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: WARNING in nf_nat_unregister_fn
Date: Fri, 17 Apr 2020 23:33:48 +0200	[thread overview]
Message-ID: <20200417213348.GC32392@breakpoint.cc> (raw)
In-Reply-To: <20200417094250.21872-1-hdanton@sina.com>

Hillf Danton <hdanton@sina.com> wrote:
> In case of failure to register NFPROTO_IPV4, unregister NFPROTO_IPV6
> instead of ops->pf (== NFPROTO_INET).
> 
> --- a/net/netfilter/nf_nat_proto.c
> +++ b/net/netfilter/nf_nat_proto.c
> @@ -1022,8 +1022,8 @@ int nf_nat_inet_register_fn(struct net *
>  	ret = nf_nat_register_fn(net, NFPROTO_IPV4, ops, nf_nat_ipv4_ops,
>  				 ARRAY_SIZE(nf_nat_ipv4_ops));
>  	if (ret)
> -		nf_nat_ipv6_unregister_fn(net, ops);
> -
> +		nf_nat_unregister_fn(net, NFPROTO_IPV6, ops,
> +					ARRAY_SIZE(nf_nat_ipv6_ops));
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(nf_nat_inet_register_fn);

Yes.  Please make a formal patch submission to netfilter-devel@,
including you signed-off-by, the Reported-by tag from syzbot
and a 'Fixes' tag for the buggy commit.

Thank you.

  parent reply	other threads:[~2020-04-17 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17  5:36 WARNING in nf_nat_unregister_fn syzbot
     [not found] ` <20200417094250.21872-1-hdanton@sina.com>
2020-04-17 21:33   ` Florian Westphal [this message]
2020-04-17 23:00     ` Stefano Brivio
     [not found]   ` <20200418082832.8904-1-hdanton@sina.com>
2020-04-19 13:00     ` 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=20200417213348.GC32392@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=hdanton@sina.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=syzbot+33e06702fd6cffc24c40@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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).