Acquiring a spinlock while holding a guarded mutex

My understanding is that if im holding a mutex I cant acquire a spinlock as the guarded mutex has IRQL <= APC_LEVEL limitations and a spinlock raises to DPC_LEVEL. Is my understanding correct here? Or is the documentation referring to the IRQL the function is called at? So as long as i acquire my guarded mutex <= APC_LEVEL and release the spinlock before i release the mutex (i.e lowering the IRQL back down to APC_LEVEL) theres no problem? Just wanting to ensure my understanding is correct since I have assumed you cannot and it breaks the IRQL limitations.

Thanks

Yes, that's right. The documentation states you must have the current IRQL <= APC_LEVEL at the time you acquire the mutex. After that, you can acquire a spinlock and release it before releasing the mutex.

Regards,

Fernando Roberto da Silva
DriverEntry Kernel Development
https://www.driverentry.com.br