On Thu, Apr 15, 2021 at 12:05 PM Lakshmi Ramasubramanian
<nramas(a)linux.microsoft.com> wrote:
On 4/9/21 7:43 AM, Lakshmi Ramasubramanian wrote:
Hi Rob,
>
>> tree:
>>
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
>> head: 8d3a1cb32124eaeb3f2efe4889de214d3b658d8d
>> commit: 3c985d31ad661a2cc0ad0a55105046fc56a7b1fd [7/57] powerpc: Use
>> common of_kexec_alloc_and_setup_fdt()
>> config: powerpc-randconfig-m031-20210403 (attached as .config)
>> compiler: powerpc64-linux-gcc (GCC) 9.3.0
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp(a)intel.com>
>> Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
>>
>> smatch warnings:
>> arch/powerpc/kexec/elf_64.c:153 elf64_load() error: uninitialized
>> symbol 'fdt'.
>
> This is a good catch. Thanks for reporting it.
>
>>
>> vim +/fdt +153 arch/powerpc/kexec/elf_64.c
>>
>> a0458284f0625a arch/powerpc/kernel/kexec_elf_64.c Thiago Jung
>> Bauermann 2016-11-29 30 unsigned long cmdline_len)
>> a0458284f0625a arch/powerpc/kernel/kexec_elf_64.c Thiago Jung
>> Bauermann 2016-11-29 31 {
>> a0458284f0625a arch/powerpc/kernel/kexec_elf_64.c Thiago Jung
>> Bauermann 2016-11-29 32 int ret;
>> 3be3f61d25e04e arch/powerpc/kernel/kexec_elf_64.c Philipp
>> Rudo 2018-04-13 33 unsigned long kernel_load_addr;
>> a0458284f0625a arch/powerpc/kernel/kexec_elf_64.c Thiago Jung
>> Bauermann 2016-11-29 34 unsigned long initrd_load_addr = 0,
>> fdt_load_addr;
>> a0458284f0625a arch/powerpc/kernel/kexec_elf_64.c Thiago Jung
>> Bauermann 2016-11-29 35 void *fdt;
>
> Initialize "fdt" to NULL here.
>
> Rob - Please let me know which branch I should use to base the fix. I
> will post the patch shortly.
>
Please let me know if I can post a patch to fix this issue using your
for-next branch?
Yes, I believe that's where the problem exists.
Rob