arch/x86/boot/compressed/eboot.c:283 setup_efi_pci() error: potentially derefencing
PATCH 73/77 arch/x86/boot/compressed/eboot.c:283 setup_efi_pci() error: potentially derefencing
Hi Matthew,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next head: 97ac9d1f363964dec7fbb20cf3c2e88336b4d801 commit: 66f2adcdadea18a583d4f7cbd773847d635731a3 [73/77] EFI: Stash ROMs if they're not in the PCI BAR
All smatch warnings:
+ arch/x86/boot/compressed/eboot.c:283 setup_efi_pci() error: potentially derefencing uninitialized 'pci_handle'.
+ arch/x86/boot/compressed/eboot.c:303 setup_efi_pci() warn: add some parenthesis here?
+ arch/x86/boot/compressed/eboot.c:303 setup_efi_pci() warn: maybe use && instead of & arch/x86/boot/compressed/eboot.c:728 handle_ramdisks() error: potentially derefencing uninitialized 'fh'.
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu <[email protected]> Intel Corporation
Re: [pci:next 73/77] arch/x86/boot/compressed/eboot.c:283 setup_efi_pci() error: potentially derefen
Quoted 11 lines · Fengguang Wu
Hi Matthew,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next head: 97ac9d1f363964dec7fbb20cf3c2e88336b4d801 commit: 66f2adcdadea18a583d4f7cbd773847d635731a3 [73/77] EFI: Stash ROMs if they're not in the PCI BARAll smatch warnings:
+
arch/x86/boot/compressed/eboot.c:283setup_efi_pci()error: potentially derefencing uninitialized 'pci_handle'.
These warnings probably have too high of a false positive rate to be worth emailing about. Although this one looks like a real bug. We should be passing "&pci_handle" to efi_call_phys5 instead of "pci_handle".
I'm not sure why GCC doesn't warn about these. Anyway, it's because GCC didn't warn about unitialized variables that I added it to Smatch.
Quoted 2 lines
+
arch/x86/boot/compressed/eboot.c:303setup_efi_pci()warn: add some parenthesis here?
+arch/x86/boot/compressed/eboot.c:303setup_efi_pci()warn: maybe use && instead of &
These are real but they duplicate Sparse warnings. :/
Quoted 2 lines
arch/x86/boot/compressed/eboot.c:728handle_ramdisks()error: potentially derefencing uninitialized 'fh'.
regards,
dan carpenter
Re: [pci:next 73/77] arch/x86/boot/compressed/eboot.c:283 setup_efi_pci() error: potentially derefen
In reply to Fengguang WuJust a reminder that the EFI ROM patches are not in my next branch yet. IIRC, there is a section mismatch issue as well as the one below.
Quoted 33 lines · Dan Carpenter
Quoted 11 lines · Fengguang Wu
Hi Matthew,
FYI, there are new smatch warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next head: 97ac9d1f363964dec7fbb20cf3c2e88336b4d801 commit: 66f2adcdadea18a583d4f7cbd773847d635731a3 [73/77] EFI: Stash ROMs if they're not in the PCI BARAll smatch warnings:
+
arch/x86/boot/compressed/eboot.c:283setup_efi_pci()error: potentially derefencing uninitialized 'pci_handle'.These warnings probably have too high of a false positive rate to be worth emailing about. Although this one looks like a real bug. We should be passing "
&pci_handle" toefi_call_phys5instead of "pci_handle".I'm not sure why GCC doesn't warn about these. Anyway, it's because GCC didn't warn about unitialized variables that I added it to Smatch.
Quoted 2 lines
+
arch/x86/boot/compressed/eboot.c:303setup_efi_pci()warn: add some parenthesis here?
+arch/x86/boot/compressed/eboot.c:303setup_efi_pci()warn: maybe use && instead of &These are real but they duplicate Sparse warnings. :/
Quoted 2 lines
arch/x86/boot/compressed/eboot.c:728handle_ramdisks()error: potentially derefencing uninitialized 'fh'.regards,
dan carpenter