⬢ DragonFlyBSD Kernel Audit
DF-5203 / fix.diff
← back to finding ↓ download raw
--- a/sys/dev/misc/ipmi/ipmi_smbus.c
+++ b/sys/dev/misc/ipmi/ipmi_smbus.c
@@ -66,6 +66,11 @@
 ipmi_smbus_probe(device_t dev)
 {
 
+	/* Honor the driver-wide singleton (ipmi.c:65, set at ipmi.c:864):
+	 * only one IPMI device may attach, across all four frontends. */
+	if (ipmi_attached)
+		return (ENXIO);
+
 	device_set_desc(dev, "IPMI System Interface");
 	return (BUS_PROBE_DEFAULT);
 }