⬢ DragonFlyBSD Kernel Audit
DF-5076 / fix.diff
← back to finding ↓ download raw
# DF-5076 fix -- generated with git diff --no-index; verify: git apply --check (passes)
# Authored against the read-only sys/ tree; NEVER applied there.
# Mirrors the sibling guards at ipmi_pci.c:77, ipmi_isa.c:85, ipmi_acpi.c:62.
diff --git a/sys/dev/misc/ipmi/ipmi_pci.c b/sys/dev/misc/ipmi/ipmi_pci.c
index 94eb4b5..53631e2 100644
--- a/sys/dev/misc/ipmi/ipmi_pci.c
+++ b/sys/dev/misc/ipmi/ipmi_pci.c
@@ -183,6 +183,9 @@ static int
 ipmi2_pci_probe(device_t dev)
 {
 
+	if (ipmi_attached)
+		return (ENXIO);
+
 	if (pci_get_class(dev) == PCIC_SERIALBUS &&
 	    pci_get_subclass(dev) == PCIS_SERIALBUS_IPMI) {
 		device_set_desc(dev, "IPMI System Interface");