⬢ DragonFlyBSD Kernel Audit
DF-5597 / fix.diff
← back to finding ↓ download raw
--- a/sys/platform/pc64/apic/ioapic_abi.h
+++ b/sys/platform/pc64/apic/ioapic_abi.h
@@ -56,6 +56,8 @@
 	volatile void	*io_addr;
 };
 #define IOAPIC_IRQI_SZSHIFT	4
+_Static_assert(sizeof(struct ioapic_irqinfo) == 1u << IOAPIC_IRQI_SZSHIFT,
+    "ioapic_irqinfo size drifted from IOAPIC_IRQI_SZSHIFT");
 
 #define IOAPIC_IRQI_FLAG_LEVEL	0x1	/* default to edge trigger */
 #define IOAPIC_IRQI_FLAG_MASKED	0x2