VM: Always flush TLB for kernel page directory changes.

Since the kernel page directory is inherited by all other page directories,
we should always flush the TLB when it's updated.
This commit is contained in:
Andreas Kling 2019-06-01 17:25:36 +02:00
parent 6956d161c4
commit 02e21de20a
Notes: sideshowbarker 2024-07-19 13:48:24 +09:00

View file

@ -32,6 +32,6 @@ void PageDirectory::flush(LinearAddress laddr)
#endif
if (!current)
return;
if (&current->process().page_directory() == this)
if (this == &MM.kernel_page_directory() || &current->process().page_directory() == this)
MM.flush_tlb(laddr);
}