On Wed, Aug 04, 2021 at 02:38:35PM +0200, Joerg Roedel wrote: > Hi Dan, > > On Wed, Aug 04, 2021 at 12:57:25PM +0300, Dan Carpenter wrote: > > These sleeping in atomic static checker warnings come with a lot of > > caveats because the call tree is very long and it's easy to have false > > positives. > > > > --> vc_raw_handle_exception() > > --> vc_forward_exception() > > --> exc_page_fault() > > > > Page faults always sleep right? > > No, page faults do no always sleep, only when IO needs to be done to > fulfill the page fault request. In this case, the page-fault handler > will never sleep, because it is called with preemption disabled. The > page-fault handler can detect this and just do nothing. The #VC handler > will return for re-fault in this case. Hm... Ok. Let give you the rest of the call tree then because I'm not seeing where it checks preempt count. exc_page_fault() <-- called with preempt disabled --> kvm_handle_async_pf() --> __kvm_handle_async_pf() --> kvm_async_pf_task_wait_schedule() calls schedule(). regards, dan carpenter