public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* stable-rc 6.1: x86: clang build failed - block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true
@ 2023-07-16 19:25 Naresh Kamboju
  2023-07-17 13:24 ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-07-16 19:25 UTC (permalink / raw)
  To: linux-stable, open list, clang-built-linux, lkft-triage
  Cc: Greg Kroah-Hartman, Sasha Levin, Nathan Chancellor,
	Nick Desaulniers, Anders Roxell

Linux stable-rc 6.1 build failed x86 and i386 with clang.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
-----------
block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized
whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
        if (init_blkcg_llists(blkcg))
            ^~~~~~~~~~~~~~~~~~~~~~~~
block/blk-cgroup.c:1287:9: note: uninitialized use occurs here
        return ret;
               ^~~
block/blk-cgroup.c:1237:2: note: remove the 'if' if its condition is
always false
        if (init_blkcg_llists(blkcg))
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
block/blk-cgroup.c:1222:33: note: initialize the variable 'ret' to
silence this warning
        struct cgroup_subsys_state *ret;
                                       ^
                                        = NULL
1 error generated.

Links,
 - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y-sanity/build/v6.1.38-599-g5071846d06ef/testrun/18327562/suite/build/test/clang-lkftconfig/history/
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/

 tuxmake \
 --runtime podman --target-arch x86_64 \
 --toolchain clang-16 \
 --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/config
\
 LLVM=1 LLVM_IAS=1

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stable-rc 6.1: x86: clang build failed - block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true
  2023-07-16 19:25 stable-rc 6.1: x86: clang build failed - block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true Naresh Kamboju
@ 2023-07-17 13:24 ` Nathan Chancellor
  2023-07-17 18:47   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2023-07-17 13:24 UTC (permalink / raw)
  To: Naresh Kamboju, Greg Kroah-Hartman, Sasha Levin
  Cc: linux-stable, open list, clang-built-linux, lkft-triage,
	Nick Desaulniers, Anders Roxell

On Mon, Jul 17, 2023 at 12:55:42AM +0530, Naresh Kamboju wrote:
> Linux stable-rc 6.1 build failed x86 and i386 with clang.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Build log:
> -----------
> block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized
> whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
>         if (init_blkcg_llists(blkcg))
>             ^~~~~~~~~~~~~~~~~~~~~~~~
> block/blk-cgroup.c:1287:9: note: uninitialized use occurs here
>         return ret;
>                ^~~
> block/blk-cgroup.c:1237:2: note: remove the 'if' if its condition is
> always false
>         if (init_blkcg_llists(blkcg))
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> block/blk-cgroup.c:1222:33: note: initialize the variable 'ret' to
> silence this warning
>         struct cgroup_subsys_state *ret;
>                                        ^
>                                         = NULL
> 1 error generated.
> 
> Links,
>  - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y-sanity/build/v6.1.38-599-g5071846d06ef/testrun/18327562/suite/build/test/clang-lkftconfig/history/
>  - https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/
> 
>  tuxmake \
>  --runtime podman --target-arch x86_64 \
>  --toolchain clang-16 \
>  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/config
> \
>  LLVM=1 LLVM_IAS=1
> 

It looks like 6.1 needs commit b5a9adcbd5dc ("blk-cgroup: Return -ENOMEM
directly in blkcg_css_alloc() error path") if it wants to take commit
3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()").

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stable-rc 6.1: x86: clang build failed - block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true
  2023-07-17 13:24 ` Nathan Chancellor
@ 2023-07-17 18:47   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-07-17 18:47 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Naresh Kamboju, Sasha Levin, linux-stable, open list,
	clang-built-linux, lkft-triage, Nick Desaulniers, Anders Roxell

On Mon, Jul 17, 2023 at 06:24:26AM -0700, Nathan Chancellor wrote:
> On Mon, Jul 17, 2023 at 12:55:42AM +0530, Naresh Kamboju wrote:
> > Linux stable-rc 6.1 build failed x86 and i386 with clang.
> > 
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > 
> > Build log:
> > -----------
> > block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized
> > whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
> >         if (init_blkcg_llists(blkcg))
> >             ^~~~~~~~~~~~~~~~~~~~~~~~
> > block/blk-cgroup.c:1287:9: note: uninitialized use occurs here
> >         return ret;
> >                ^~~
> > block/blk-cgroup.c:1237:2: note: remove the 'if' if its condition is
> > always false
> >         if (init_blkcg_llists(blkcg))
> >         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > block/blk-cgroup.c:1222:33: note: initialize the variable 'ret' to
> > silence this warning
> >         struct cgroup_subsys_state *ret;
> >                                        ^
> >                                         = NULL
> > 1 error generated.
> > 
> > Links,
> >  - https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-6.1.y-sanity/build/v6.1.38-599-g5071846d06ef/testrun/18327562/suite/build/test/clang-lkftconfig/history/
> >  - https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/
> > 
> >  tuxmake \
> >  --runtime podman --target-arch x86_64 \
> >  --toolchain clang-16 \
> >  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2SfFoWj9NmKWHRijR0hcoXGjLhr/config
> > \
> >  LLVM=1 LLVM_IAS=1
> > 
> 
> It looks like 6.1 needs commit b5a9adcbd5dc ("blk-cgroup: Return -ENOMEM
> directly in blkcg_css_alloc() error path") if it wants to take commit
> 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()").

I'm going to drop the offending patch now, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-17 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-16 19:25 stable-rc 6.1: x86: clang build failed - block/blk-cgroup.c:1237:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true Naresh Kamboju
2023-07-17 13:24 ` Nathan Chancellor
2023-07-17 18:47   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox