summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-11-11 21:19:43 +0000
committerjhb <jhb@FreeBSD.org>2003-11-11 21:19:43 +0000
commit39d0219649224ffa6dc411f7207c10387d88a84e (patch)
tree3787a72c4d0c9e68f98d764e302ee9caadb73d5a /sys
parent409b8525db0117ee562d9492223ddd81527efe68 (diff)
downloadFreeBSD-src-39d0219649224ffa6dc411f7207c10387d88a84e.zip
FreeBSD-src-39d0219649224ffa6dc411f7207c10387d88a84e.tar.gz
Don't probe busses in the MP Table for the MP Table PCI bridge drivers
if the bus number doesn't correspond to a PCI bus in the MP Table. Reported by: jhay
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/mptable.c2
-rw-r--r--sys/i386/i386/mptable.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index 7222748..d4683d5 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -893,6 +893,8 @@ mptable_pci_probe_table(int bus)
return (EINVAL);
if (pci0 == -1 || pci0 + bus > mptable_maxbusid)
return (ENXIO);
+ if (busses[pci0 + bus].bus_type != PCI)
+ return (ENXIO);
args.bus = pci0 + bus;
args.found = 0;
mptable_walk_table(mptable_pci_probe_table_handler, &args);
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index 7222748..d4683d5 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -893,6 +893,8 @@ mptable_pci_probe_table(int bus)
return (EINVAL);
if (pci0 == -1 || pci0 + bus > mptable_maxbusid)
return (ENXIO);
+ if (busses[pci0 + bus].bus_type != PCI)
+ return (ENXIO);
args.bus = pci0 + bus;
args.found = 0;
mptable_walk_table(mptable_pci_probe_table_handler, &args);
OpenPOWER on IntegriCloud