Re: [syzbot] [kvm?] WARNING: locking bug in __refill_objects_node
From: Sean Christopherson
Date: Tue Nov 03 2026 - 10:32:19 EST
On Tue, Nov 03, 2026, Paolo Bonzini wrote:
> On Mon, Nov 2, 2026 at 6:43 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
> > > If so, we need to make that a thread for RT kernels if you want to call
> > > kzalloc_obj().
> >
> > Eww. I can't imagine there's a sane usecase for memory overcommitting a real-time
> > guest.
>
> While I agree with the feeling, the dummy allocation path should be
> mostly dead, because page fault should never (?) enable interrupts
> before waiting:
>
> #PF interrupt gate
> exc_page_fault()
> kvm_handle_async_pf()
> __kvm_handle_async_pf()
> irqentry_enter()
> kvm_async_pf_task_wait_schedule()
> kvm_async_pf_queue_task() <- registers waiter
> prepare_to_swait_exclusive()
> local_irq_enable()
>
> The dummy allocation path is only reachable if it's an L1 hypervisor
> that is getting an async page fault while L2 is running, because it
> enables irq before the call to kvm_async_pf_task_wait_schedule(). I
> think we can drop the dummy allocation for good, which would be even
> better.
+1, I completely forgot what this code is doing (although that implies I ever
knew in the first place...).
> Whether you would still want to disable APF for RT kernels is up to you.
Nah, on second thought there are use cases for async #PF other than memory
overcommit. Whether or not they coincide with PREEMPT_RT is debatable, but I
don't think it makes sense to go looking for trouble.