Yay someone actually reviewing code :D
Cancel routines are called with the cancel spinlock held and must release it at some point during their execution.
http://msdn.microsoft.com/en-us/library/windows/hardware/ff540742(v=vs.85).a...
On 2013-09-20 11:53, Hermès BÉLUSCA - MAÏTO wrote:
I think a call to IoReleaseCancelSpinLock should be balanced with a call to IoAcquireCancelSpinLock somewhere in the npfs_new code, however, looking at:
http://git.reactos.org/?p=reactos.git http://git.reactos.org/?p=reactos.git&a=search&h=HEAD&st=grep&s=IoAcquireCa ncelSpinLock &a=search&h=HEAD&st=grep&s=IoAcquireCancelSpinLock
I don’t see any call to IoAcquireCancelSpinLock in npfs_new. Can someone explain to me, why ?
Hermès
Author: tfaber
Date: Fri Sep 20 06:49:21 2013
New Revision: 60231
URL: http://svn.reactos.org/svn/reactos?rev=60231&view=rev
Log:
[NPFS]
- Release cancel spinlock in NpCancelListeningQueueIrp
Modified:
trunk/reactos/drivers/filesystems/npfs_new/statesup.cModified: trunk/reactos/drivers/filesystems/npfs_new/statesup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_ne w/statesup.c?rev=60231&r1=60230&r2=60231&view=diff
============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/statesup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/statesup.c [iso-8859-1] Fri Sep 20 06:49:21 2013
@@ -20,6 +20,8 @@
NpCancelListeningQueueIrp(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp){
IoReleaseCancelSpinLock(Irp->CancelIrql);
FsRtlEnterFileSystem();
NpAcquireExclusiveVcb();