In the post op callback to IRP_MJ_CREATE my mini filter needs to open up a stream (or at least see if it is there) for the file that is being opened.
e.g \Device\HarddiskVolume1\Dir1\Subdir2\Somefile.xyz:Abc.def
Since I’m in PostOp and I need to have IRQL = passive for FltCreateFile, I issue a FltQueueDeferredIoWorkItem() which will launch the code to open the stream when it can.
When my routine does get called, I’ve checked to see that the IRQL = 0 for the cores in my machine and indeed windbg says they are. In fact I do this just before I make the call to FltCreateFile().
InitializeObjectAttributes(&ObjAttr,&RDMStreamName,OBJ_KERNEL_HANDLE,NULL,NULL);
Status = FltCreateFile(RepData.Filter,pIC,StreamHandle, FILE_READ_DATA|FILE_READ_ATTRIBUTES,
&ObjAttr,&IoStatus,
0,FILE_ATTRIBUTE_NORMAL, FILE_SHARE_READ,FILE_OPEN, //fail if it does not exist.
FILE_NON_DIRECTORY_FILE,
NULL, //ea buffer
0, // ea len
0);
BUT… I’m dying with IRQL_NOT_LESS_OR_EQUAL (a)
Arg1: 00000084, memory referenced <---- why is something looking over here?
Arg2: 00000002, IRQL
Arg3: 00000001, bitfield :
bit 0 : value 0 = read operation, 1 = write operation
bit 3 : value 0 = not an execute operation, 1 = execute operation (only on chips which support this level of status)
Arg4: 81ba4e79, address which referenced memory.
Here is the thrreads stack:
0 82fd7b58 818769c9 hal!KeAcquireInStackQueuedSpinLockRaiseToSynch+0x19
01 82fd7b78 82173235 nt!ExAcquireResourceSharedLite+0x21
02 82fd7b98 82190d83 fltmgr!FltpGetNextCallbackNodeForInstance+0x29
03 82fd7bc0 8218abe5 fltmgr!TargetedIOCtrlGenerateECP+0x155
04 82fd7c20 8218ad1c fltmgr!FltCreateFileEx2+0x69
05 82fd7c68 8e1187ad fltmgr!FltCreateFile+0x38
06 82fd7cdc 8e1135bf RDMFilter!DoesRDMStreamExist+0x8d
07 82fd7d14 82193bd4 RDMFilter!SafePostCreateProcessing_Succeed+0x5f
08 82fd7d44 81878db8 fltmgr!FltpProcessDeferredIoWorkItem+0x34
09 82fd7d7c 81a25472 nt!ExpWorkerThread+0xfd
0a 82fd7dc0 8189141e nt!PspSystemThreadStartup+0x9d
0b 00000000 00000000 nt!KiThreadStartup+0x16
I guess that I’ve missed something about the problem of opening up streams, but
I don’t see it from here, does anyone have some insight???
Thanks
Larry