Re: [PATCH] perf/x86/intel/uncore: Avoid null dereferences (uncore_extra_pci_dev)

2021-04-15 Thread Liang, Kan
On 4/15/2021 5:19 PM, Liang, Kan wrote: Hi Steve, On 4/15/2021 4:37 PM, Steve Wahl wrote: If an uncore has no pci_init routine, or that routine fails, uncore_pci_init is not called, and memory is not allocated for uncore_extra_pci_dev. So check to make sure uncore_extra_pci_dev is not NULL

Re: [PATCH] perf/x86/intel/uncore: Avoid null dereferences (uncore_extra_pci_dev)

2021-04-15 Thread Liang, Kan
Hi Steve, On 4/15/2021 4:37 PM, Steve Wahl wrote: If an uncore has no pci_init routine, or that routine fails, uncore_pci_init is not called, and memory is not allocated for uncore_extra_pci_dev. So check to make sure uncore_extra_pci_dev is not NULL before use. I think more after

[PATCH] perf/x86/intel/uncore: Avoid null dereferences (uncore_extra_pci_dev)

2021-04-15 Thread Steve Wahl
If an uncore has no pci_init routine, or that routine fails, uncore_pci_init is not called, and memory is not allocated for uncore_extra_pci_dev. So check to make sure uncore_extra_pci_dev is not NULL before use. And fix the case that led us to discover the null derefs; don't fail