From cb6fc76b8b91a9f878a6f90e545651cbddc6d355 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Sun, 14 Jun 2020 13:49:22 +0200 Subject: [PATCH] [NTOS:IO] IoDisconnectInterrupt(): Switch to ExFreePoolWithTag() (#6503) Follow-up to commit 24a14abf2 (r57412). HBelusca's comment: > If this ExFreePoolWithTag() call was left commented, it's probably > because, back in the day where I introduced it, there was a pool > corruption that was detected, the source of which was unknown at > that time. In retrospect, it is most probably the interrupt disconnect > bug in IoDisconnectInterrupt() that was causing it. Now that this > bug has been fixed just previously, it should be safe to re-enable > pool freeing with tag. --- ntoskrnl/io/iomgr/irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/io/iomgr/irq.c b/ntoskrnl/io/iomgr/irq.c index f7af1c73043..6e09f6b196e 100644 --- a/ntoskrnl/io/iomgr/irq.c +++ b/ntoskrnl/io/iomgr/irq.c @@ -146,7 +146,7 @@ IoDisconnectInterrupt(PKINTERRUPT InterruptObject) PAGED_CODE(); - /* Get the I/O Interrupt */ + /* Get the I/O interrupt */ IoInterrupt = CONTAINING_RECORD(InterruptObject, IO_INTERRUPT, FirstInterrupt); @@ -165,8 +165,8 @@ IoDisconnectInterrupt(PKINTERRUPT InterruptObject) KeDisconnectInterrupt(IoInterrupt->Interrupt[i]); } - /* Free the I/O Interrupt */ - ExFreePool(IoInterrupt); // ExFreePoolWithTag(IoInterrupt, TAG_KINTERRUPT); + /* Free the I/O interrupt */ + ExFreePoolWithTag(IoInterrupt, TAG_KINTERRUPT); } NTSTATUS