1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

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

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);
}