Loading...
iokit/Kernel/IOInterruptController.cpp xnu-12377.101.15 xnu-8019.80.24
--- xnu/xnu-12377.101.15/iokit/Kernel/IOInterruptController.cpp
+++ xnu/xnu-8019.80.24/iokit/Kernel/IOInterruptController.cpp
@@ -479,7 +479,7 @@
 
 
 	if (isStart) {
-#if SCHED_HYGIENE_DEBUG
+#if INTERRUPT_MASKED_DEBUG
 		ml_irq_debug_start((uintptr_t)vector->handler, (uintptr_t)vector);
 #endif
 		IOTimeStampStartConstant(IODBG_INTC(IOINTC_HANDLER), (uintptr_t)vectorNumber, (uintptr_t)unslidHandler,
@@ -487,7 +487,7 @@
 	} else {
 		IOTimeStampEndConstant(IODBG_INTC(IOINTC_HANDLER), (uintptr_t)vectorNumber, (uintptr_t)unslidHandler,
 		    (uintptr_t)unslidTarget, (uintptr_t)providerID);
-#if SCHED_HYGIENE_DEBUG
+#if INTERRUPT_MASKED_DEBUG
 		ml_irq_debug_end();
 #endif
 	}
@@ -634,7 +634,7 @@
 	}
 
 	// Create the vectorData for the IOInterruptSource.
-	vectorData = OSData::withValue(vectorNumber);
+	vectorData = OSData::withBytes(&vectorNumber, sizeof(vectorNumber));
 	if (vectorData == NULL) {
 		IOLockUnlock(vector->interruptLock);
 		return kIOReturnNoMemory;
@@ -689,10 +689,6 @@
 
 		// Soft disable the source and the controller too.
 		disableInterrupt(nub, source);
-
-		// Free vectorData
-		IOInterruptSource *interruptSources = nub->_interruptSources;
-		OSSafeReleaseNULL(interruptSources[source].vectorData);
 
 		// Clear all the storage for the vector except for interruptLock.
 		vector->interruptActive = 0;