On Fri, 18 Dec 2020 13:34:39 +0100, Mark Kettenis wrote: > Anyway, your analysis is right. When a kernel thread wants to use > pmap_extract(9) on a userland pmap, it needs to lock pm_apte_mtx to > prevent another thread from simultaniously activating a userland pmap > too. So indeed, pm_apte_mtx needs to be properly initialized for the > kernel pmap. > > However, pm_mtx should never be used for the kernel pmap. If we don't > initialize the lock, witness will help us catching this condition, so > maybe we shouldn't...
I think a comment is warranted if we don't want to initialize the lock to prevent someone from fixing this in the future ;-) - todd