On Tue, Nov 10, 2020 at 17:16:41, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > New Coverity complaint about v5.10-rc3, resulting from 9fff3256f93d > ("PCI: dwc: Restore ATU memory resource setup to use last entry"). > > I didn't try to figure out if this is real or a false positive, so > just FYI. > > ----- Forwarded message from scan-admin@xxxxxxxxxxxx ----- > > Date: Mon, 09 Nov 2020 11:13:37 +0000 (UTC) > From: scan-admin@xxxxxxxxxxxx > To: bjorn@xxxxxxxxxxx > Subject: New Defects reported by Coverity Scan for Linux > Message-ID: <5fa924618fb3b_a62932acac7322f5033088@xxxxxxxxxxxxxxxxxxxxxxxxx> > > > ** CID 1469110: Null pointer dereferences (FORWARD_NULL) > /drivers/pci/controller/dwc/pcie-designware-host.c: 596 in dw_pcie_setup_rc() > > > ________________________________________________________________________________________________________ > *** CID 1469110: Null pointer dereferences (FORWARD_NULL) > /drivers/pci/controller/dwc/pcie-designware-host.c: 596 in dw_pcie_setup_rc() > 590 > 591 /* Get last memory resource entry */ > 592 resource_list_for_each_entry(tmp, &pp->bridge->windows) > 593 if (resource_type(tmp->res) == IORESOURCE_MEM) Can the pp->bridge->windows list be empty in a typical use case? > 594 entry = tmp; > 595 > >>> CID 1469110: Null pointer dereferences (FORWARD_NULL) > >>> Dereferencing null pointer "entry". > 596 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX0, > 597 PCIE_ATU_TYPE_MEM, entry->res->start, > 598 entry->res->start - entry->offset, > 599 resource_size(entry->res)); > 600 if (pci->num_viewport > 2) > 601 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX2,