[Bug 261338] [PATCH] kernel panic "bad pte" under heavy CPU load on 12.2 and 12.3 (i386)

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 20 Jan 2022 04:34:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261338

--- Comment #5 from Dmitry K. <thedix@yandex.ru> ---
smp_targeted_tlb_shootdown() is invoked in smp_masked_invl*() and
smp_cache_flush(). 

As I can see smp_masked_invl*() are invoked with correct sched_pin() /
sched_unpin() order in pmap_*().

But smp_cache_flush() is invoked by pmap_invalidate_cache(), which is called in
multiple places in pmap_*(). Some functions do not have outer sched_pin() /
sched_unpin() guarding when calling pmap_invalidate_cache(), for example, in
pmap_flush_page(). And it leads to the wrong order of pins in
smp_targeted_tlb_shootdown().

So I would suggest to call sched_pin() / sched_unpin() explicitly in
smp_targeted_tlb_shootdown() to make sure (as it was in the previous version).

-- 
You are receiving this mail because:
You are the assignee for the bug.