Re: [linux-next20260529] kernel BUG at kernel/sched/core.c:7512!
From: Peter Zijlstra <peterz@infradead.org>
Date: 2026-06-01 09:56:12
Also in:
lkml
From: Peter Zijlstra <peterz@infradead.org>
Date: 2026-06-01 09:56:12
Also in:
lkml
On Mon, Jun 01, 2026 at 02:46:24PM +0530, Shrikanth Hegde wrote:
Ritesh, Mukesh, Is below possible scenario?
do_page_fault seems to enable irq's in the interrupt handler?
is that expected? if so, one might see
-- do_page_fault (enter kernel mode)
-- enables interrupts
-- gets interrupt - Sets need_resched.
-- irqentry_exit - Sees it is kernel mode. Just checks preempt count
and calls preempt_schedule_irq, which catches both
preempt_count and !irqs_disabled. Hence the panic?
Should do_page_fault do preempt_disable when it enables the interrupts?No, it is expected for page-fault to be able to schedule. Specifically, it must be able to sleep to support loading pages from disk. Please check the value of preempt_count() (does it perchance have HARDIRQ_OFFSET?). Also, if the fault handler does enable IRQs, it must also disable them again once done. Notably, I see ___do_page_fault() do interrupt_cond_loadl_irq_enable(), but I'm not seeing a local_irq_disable() to match!