All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Patrick McHardy <kaber@trash.net>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	"David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2 netfilter-next] netfilter: nf_tables: fib warnings
Date: Mon, 31 Oct 2016 15:17:12 +0100	[thread overview]
Message-ID: <20161031141712.GA21444@salvia> (raw)
In-Reply-To: <20161028232612.GA30488@breakpoint.cc>

On Sat, Oct 29, 2016 at 01:26:12AM +0200, Florian Westphal wrote:
> Arnd Bergmann <arnd@arndb.de> wrote:
> > The newly added nft fib code produces two warnings:
> > 
> > net/ipv4/netfilter/nft_fib_ipv4.c: In function 'nft_fib4_eval':
> > net/ipv4/netfilter/nft_fib_ipv4.c:80:6: error: unused variable 'i' [-Werror=unused-variable]
> > net/ipv4/netfilter/nft_fib_ipv4.c: In function ‘nft_fib4_eval’:
> > net/ipv4/netfilter/nft_fib_ipv4.c:137:6: error: ‘oif’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> > 
> > The first one is obvious as the only user of that variable is
> > inside of an #ifdef
> > 
> > The second one is a bit trickier. It's clear that oif is in fact
> > uninitialized when it gets used when neither NFTA_FIB_F_IIF nor
> > NFTA_FIB_F_OIF are set, and just setting it to NULL won't work
> > as it may later get dereferenced.
> > 
> > However, there is no need to search the result list if it is
> > NULL, as Florian pointed out. This integrates his (untested)
> > change to do so. I have confirmed that the combined patch
> > solves both warnings, but as I don't fully understand Florian's
> > change, I can't tell if it's correct.
> > 
> > Suggested-by: Florian Westphal <fw@strlen.de>
> > Fixes: 84f5eedb983e ("netfilter: nf_tables: add fib expression")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[...] 
> Tested-by: Florian Westphal <fw@strlen.de>

Applied, thanks!

      reply	other threads:[~2016-10-31 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 20:17 [PATCH] [v2 netfilter-next] netfilter: nf_tables: fib warnings Arnd Bergmann
2016-10-28 23:26 ` Florian Westphal
2016-10-31 14: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=20161031141712.GA21444@salvia \
    --to=pablo@netfilter.org \
    --cc=arnd@arndb.de \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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.