Re: arch/powerpc/kexec/crash.c:311:22: error: variable 'i' might be clobbered by 'longjmp' or 'vfork'

From: Alexander Potapenko
Date: Mon Oct 31 2022 - 04:28:16 EST


Looks unrelated to this 2-year old commit?

On Sun, Oct 30, 2022 at 6:12 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 882ad2a2a8ffa1defecdf907052f04da2737dc46
> commit: f0fe00d4972a8cd4b98cc2c29758615e4d51cdfe security: allow using Clang's zero initialization for stack variables
> date: 2 years, 4 months ago
> config: powerpc-wii_defconfig
> compiler: powerpc-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f0fe00d4972a8cd4b98cc2c29758615e4d51cdfe
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout f0fe00d4972a8cd4b98cc2c29758615e4d51cdfe
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All errors (new ones prefixed by >>):
>
> arch/powerpc/kexec/crash.c: In function 'default_machine_crash_shutdown':
> >> arch/powerpc/kexec/crash.c:311:22: error: variable 'i' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
> 311 | unsigned int i;
> | ^
> cc1: all warnings being treated as errors
>
>
> vim +311 arch/powerpc/kexec/crash.c
>
> 496b010e1e70a9 arch/powerpc/kernel/crash.c Michael Neuling 2008-01-18 308
> cc53291521701f arch/powerpc/kernel/crash.c Michael Ellerman 2005-12-04 309 void default_machine_crash_shutdown(struct pt_regs *regs)
> cc53291521701f arch/powerpc/kernel/crash.c Michael Ellerman 2005-12-04 310 {
> 496b010e1e70a9 arch/powerpc/kernel/crash.c Michael Neuling 2008-01-18 @311 unsigned int i;
>
> :::::: The code at line 311 was first introduced by commit
> :::::: 496b010e1e70a9b4286fa34f19523f24a194f119 [POWERPC] kdump shutdown hook support
>
> :::::: TO: Michael Neuling <mikey@xxxxxxxxxxx>
> :::::: CC: Paul Mackerras <paulus@xxxxxxxxx>
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp



--
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg