Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1511218

Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings
Date 2016-10-28 18:20 +0200
Message-ID <sxi2R-2c2-13@gated-at.bofh.it> (permalink)
References <sxhq9-1EL-13@gated-at.bofh.it> <sxhJv-1LS-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday, October 28, 2016 5:50:31 PM CEST 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, but the second one is a bit trickier.
> > It is clear that 'oif' is uninitialized here if neither
> > NFTA_FIB_F_OIF nor NFTA_FIB_F_IIF are set.
> > 
> > I have no idea how that should be handled, this patch just
> > returns without doing anything, which may or may not be
> > the right thing to do.
> 
> It should be initialized to NULL.

Ok, I had considered that, but wasn't sure if ->nh_dev could
ever be NULL, as that would then get dereferenced.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Arnd Bergmann <arnd@arndb.de> - 2016-10-28 17:40 +0200
  Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Florian Westphal <fw@strlen.de> - 2016-10-28 18:00 +0200
    Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Arnd Bergmann <arnd@arndb.de> - 2016-10-28 18:20 +0200
      Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Florian Westphal <fw@strlen.de> - 2016-10-28 18:30 +0200
        Re: [PATCH] [rfc, netfilter-next] netfilter: nf_tables: fib warnings Arnd Bergmann <arnd@arndb.de> - 2016-10-28 22:30 +0200

csiph-web