All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gao Feng" <gfree.wind@foxmail.com>
To: "'Liping Zhang'" <zlpnobody@gmail.com>, <gfree.wind@foxmail.com>
Cc: "'Pablo Neira Ayuso'" <pablo@netfilter.org>,
	"'Netfilter Developer Mailing List'"
	<netfilter-devel@vger.kernel.org>
Subject: RE: [PATCH nf v4 1/1] netfilter: snmp: Fix one possible panic when snmp_trap_helper fail to register
Date: Sat, 25 Mar 2017 18:00:51 +0800	[thread overview]
Message-ID: <000301d2a54e$afc437f0$0f4ca7d0$@foxmail.com> (raw)
In-Reply-To: <CAML_gOfz33nvrG0fu1KLeMQbYsVSPP6CdoNLUFUiMh8YG7Hs0A@mail.gmail.com>

Hi Liping,

> -----Original Message-----
> From: Liping Zhang [mailto:zlpnobody@gmail.com]
> Sent: Saturday, March 25, 2017 4:17 PM
> To: gfree.wind@foxmail.com
> Cc: Pablo Neira Ayuso <pablo@netfilter.org>; Netfilter Developer Mailing List
> <netfilter-devel@vger.kernel.org>; Gao Feng <fgao@ikuai8.com>
> Subject: Re: [PATCH nf v4 1/1] netfilter: snmp: Fix one possible panic when
> snmp_trap_helper fail to register
> 
> Hi Feng,
> 
> 2017-03-25 10:24 GMT+08:00  <gfree.wind@foxmail.com>:
> [...]
> > @@ -1293,12 +1283,7 @@ static int __init nf_nat_snmp_basic_init(void)
> >         BUG_ON(nf_nat_snmp_hook != NULL);
> >         RCU_INIT_POINTER(nf_nat_snmp_hook, help);
> >
> > -       ret = nf_conntrack_helper_register(&snmp_trap_helper);
> > -       if (ret < 0) {
> > -               nf_conntrack_helper_unregister(&snmp_helper);
> > -               return ret;
> > -       }
> > -       return ret;
> > +       return nf_conntrack_helper_register(&snmp_trap_helper);
> 
> I think you should also remove the "int ret = 0;" statement,
> 
> static int __init nf_nat_snmp_basic_init(void) {
>      int ret = 0;  <--- Here
> 
> Otherwise, GCC will warn "unused variable".

Thanks.
I didn't see the warning during compiling.
I think it should be overlapped because I pull the upstream.
There are other changes.

Next time, I would only touch the changed files and compile.
Thanks again.

Feng






  reply	other threads:[~2017-03-25 10:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-25  2:24 [PATCH nf v4 1/1] netfilter: snmp: Fix one possible panic when snmp_trap_helper fail to register gfree.wind
2017-03-25  8:16 ` Liping Zhang
2017-03-25 10:00   ` Gao Feng [this message]
2017-03-27 14:01 ` kbuild test robot
2017-03-27 14:08   ` Gao Feng

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='000301d2a54e$afc437f0$0f4ca7d0$@foxmail.com' \
    --to=gfree.wind@foxmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=zlpnobody@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.