From: Simon Horman <horms@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>,
clang-built-linux <llvm@lists.linux.dev>,
Netdev <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
Linux Regressions <regressions@lists.linux.dev>,
Anders Roxell <anders.roxell@linaro.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Nick Desaulniers <ndesaulniers@google.com>,
Florian Westphal <fw@strlen.de>,
Steffen Klassert <steffen.klassert@secunet.com>
Subject: Re: net/xfrm/xfrm_policy.c:1286:8: error: variable 'dir' is uninitialized when used here [-Werror,-Wuninitialized]
Date: Sat, 31 Aug 2024 09:24:11 +0100 [thread overview]
Message-ID: <20240831082411.GC4063074@kernel.org> (raw)
In-Reply-To: <20240830214757.GA3819549@thelio-3990X>
On Fri, Aug 30, 2024 at 02:47:57PM -0700, Nathan Chancellor wrote:
> Hi Simon (and Naresh),
>
> On Fri, Aug 30, 2024 at 06:04:49PM +0100, Simon Horman wrote:
> > On Fri, Aug 30, 2024 at 05:47:06PM +0100, Simon Horman wrote:
> > > + Florian, Steffen
> > >
> > > On Fri, Aug 30, 2024 at 12:15:10PM +0530, Naresh Kamboju wrote:
> > > > The x86_64 defconfig builds failed on today's Linux next-20240829
> > > > due to following build warnings / errors.
> > > >
> > > > Regressions:
> > > > * i386, build
> > > > - clang-18-defconfig
> > > > - clang-nightly-defconfig
> > > >
> > > > * x86_64, build
> > > > - clang-18-lkftconfig
> > > > - clang-18-lkftconfig-compat
> > > > - clang-18-lkftconfig-kcsan
> > > > - clang-18-lkftconfig-no-kselftest-frag
> > > > - clang-18-x86_64_defconfig
> > > > - clang-nightly-lkftconfig
> > > > - clang-nightly-lkftconfig-kselftest
> > > > - clang-nightly-x86_64_defconfig
> > > > - rustclang-nightly-lkftconfig-kselftest
> > > >
> > > > first seen on next-20240829.
> > > > Good: next-20240828
> > > > BAD: next-20240829
> > > >
> > > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > > >
> > > > build log:
> > > > --------
> > > > net/xfrm/xfrm_policy.c:1286:8: error: variable 'dir' is uninitialized
> > > > when used here [-Werror,-Wuninitialized]
> > > > 1286 | if ((dir & XFRM_POLICY_MASK) == XFRM_POLICY_OUT) {
> > > > | ^~~
> > > > net/xfrm/xfrm_policy.c:1257:9: note: initialize the variable 'dir' to
> > > > silence this warning
> > > > 1257 | int dir;
> > > > | ^
> > > > | = 0
> > > > 1 error generated.
>
> Thanks for the report.
>
> > > I believe that is due to
> > > commit 08c2182cf0b4 ("xfrm: policy: use recently added helper in more places")
> > >
> > > I will work on a fix to initialise dir in the loop where it is used.
> >
> > Patch is here:
> > - [PATCH ipsec-next] xfrm: Initialise dir in xfrm_hash_rebuild()
> > https://lore.kernel.org/netdev/20240830-xfrm_hash_rebuild-dir-v1-1-f75092d07e1b@kernel.org/T/#u
>
> I sent the same patch as a v1 but Florian pointed out that dir needs to
> be initialized in the other loop too. I sent my v2 for it yesterday, it
> just needs to be merged.
>
> https://lore.kernel.org/all/20240829-xfrm-restore-dir-assign-xfrm_hash_rebuild-v2-1-1cf8958f6e8e@kernel.org/
Thanks, and sorry for the noise.
prev parent reply other threads:[~2024-08-31 8:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 6:45 net/xfrm/xfrm_policy.c:1286:8: error: variable 'dir' is uninitialized when used here [-Werror,-Wuninitialized] Naresh Kamboju
2024-08-30 16:47 ` Simon Horman
2024-08-30 17:04 ` Simon Horman
2024-08-30 21:47 ` Nathan Chancellor
2024-08-31 8:24 ` Simon Horman [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=20240831082411.GC4063074@kernel.org \
--to=horms@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=arnd@arndb.de \
--cc=dan.carpenter@linaro.org \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=llvm@lists.linux.dev \
--cc=naresh.kamboju@linaro.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=steffen.klassert@secunet.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).