diff options
| author | Aleksandr Mishin <[email protected]> | 2024-05-05 06:15:17 +0000 |
|---|---|---|
| committer | Bjorn Helgaas <[email protected]> | 2024-05-28 16:15:15 +0000 |
| commit | a231707a91f323af1e5d9f1722055ec2fc1c7775 (patch) | |
| tree | 008266f2eef874ca9eeaf1fc68348cb244cd71e1 /drivers/pci/controller/dwc/pcie-qcom-ep.c | |
| parent | PCI: keystone: Don't enable BAR 0 for AM654x (diff) | |
| download | kernel-a231707a91f323af1e5d9f1722055ec2fc1c7775.tar.gz kernel-a231707a91f323af1e5d9f1722055ec2fc1c7775.zip | |
PCI: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs()
If IORESOURCE_MEM is not provided in Device Tree due to
any error, resource_list_first_type() will return NULL and
pci_parse_request_of_pci_ranges() will just emit a warning.
This will cause a NULL pointer dereference. Fix this bug by adding NULL
return check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 0f71c60ffd26 ("PCI: dwc: Remove storing of PCI resources")
Link: https://lore.kernel.org/linux-pci/[email protected]
Suggested-by: Bjorn Helgaas <[email protected]>
Suggested-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: Aleksandr Mishin <[email protected]>
Signed-off-by: Krzysztof WilczyĆski <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-ep.c')
0 files changed, 0 insertions, 0 deletions
