]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Detect invalid PCI devices more correctly in PCI interrupt router drivers.
authorjhb <jhb@FreeBSD.org>
Tue, 6 Aug 2019 23:15:04 +0000 (23:15 +0000)
committerjhb <jhb@FreeBSD.org>
Tue, 6 Aug 2019 23:15:04 +0000 (23:15 +0000)
commit32cfb3eef3edecaf1986c7be0894f4a3f431c1eb
treec7793ebe677d1beb1be4fe2e22a4848226eeb366
parentf080ec4e3a5be09f1d5eafaf49c3b563ade82dfc
Detect invalid PCI devices more correctly in PCI interrupt router drivers.

- Check for an invalid device (vendor is invalid) before reading the
  header type register when examining function 0 of a possible device.
- When iterating over functions of a device, reject any device whose
  16-bit vendor is invalid rather than requiring the full 32-bit
  vendor+device to be all 1's.  In practice the latter check is
  probably fine, but checking the vendor is what the PCI spec
  recommends.

Reviewed by: imp
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D21147
sys/dev/acpica/acpi_pci_link.c
sys/i386/pci/pci_pir.c