Pending IRPs with IRP_SYNCHRONOUS_API flag in Minifilter!!

Hi!
I am implementing a minifilter in which i need to pend all incoming requests from my precallback.
As per the WDK documentation i have not pended the IRPs when any of the following conditions are true:

  1. TopLevelIrp != NULL
  2. Its a PAGING_IO request.

But the minifilter goes into a deadlock. Then i tried not to pend IRPS with IRP_SYNCHRONOUS_API flag also. The minifilter works fine then.
Is it that i cannot pend IRPs with IRP_SYNCHRONOUS_API flag set??

Thanks!
Ayush.

Sorry guys!!
I think the problem is not because of this.
Basically the FltCompletePendedPreOperation is hanging.
The call is not returning.
In other words when i make a call to FltCompletePendedPreOperation(), sometimes the control does not back to the worker thread. And hence the worker thread gets stuck.