Problem:
Reentrancy problem (hang or deadlocks) with opening files with IoCreateFileSpecifyDeviceObjectHint or “shadow device implementation” on offline folders
Description:
During create, our driver needs to check if a specific file exists. For that purpose it was issung a ZwCreateFile() call which resulted in expected reentrancy, but with offline folders
ZwCreateFile() was retrieving full network path of the file instead of CSC path on reentrant
create.
So I replaced the ZwCreateFile() call with IoCreateFileSpecifyDeviceObjectHint(), it was
working perfectly except for offline folders - it was causing a reentrancy in the context of
svchost.exe possibly from CSC driver.
Then I implemented opening the file using “shadow device object”, the solution also worked perfectly on everything except offline folders again - when sending shadow create IRP down (caused by ZwCreateFile) to the lower device, reentrancy from svchost.exe with no shadow device extension occured.
What will be the solution of the problem?
Thanks,
Armen