HomeFreeBSD

dmar: Don't try to reserve PCI regions for non-existing devices

Description

dmar: Don't try to reserve PCI regions for non-existing devices

In some cases we might have to create DMAR context before the
corresponding device has been enumerated by the PCI bus.
In that case we get called with NULL dev, because of that trying
to reserve PCI regions causes a NULL pointer dereference in
pci_find_pcie_root_port.

Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 2 weeks
Reviewed by: kib, rlibby
Differential revision: https://reviews.freebsd.org/D32589

Details

Provenance
kdAuthored on Oct 21 2021, 12:46 PM
wmaCommitted on Oct 29 2021, 8:08 AM
Reviewer
kib
Differential Revision
D32589: dmar: Don't try to reserve PCI regions for non-existing devices
Parents
rGccfa9ac5ac12: NXP: Add ls1028a SPI clock driver
Branches
Unknown
Tags
Unknown