Clarification needed on Hooking using IoCreateFile

Hello everybody,

I’ve developed a driver which hooks IoCreateFile and does some processing
on the file before chaining to the original call. The program uses
ZwCreateFile and ZwReadFile and other Zw fileio routines.

The program works fine excepts for the following scenario.

When the file is being accessed from another machine the programs seems to
hang or the control does not return from ZwReadFile or ZwCreateFile.

From the IoCreateFile the job is handed over to one of the worker thread
created at startup.

Can anybody please help on the situation.

Thanks in advance