Kernel: Purging a page should point it back to the shared zero page

Anonymous VM objects should never have null entries in their physical
page list. Instead, "empty" or untouched pages should refer to the
shared zero page.

Fixes #1237.
This commit is contained in:
Andreas Kling 2020-02-18 09:54:34 +01:00
commit 4b16ac0034
Notes: sideshowbarker 2024-07-19 09:15:11 +09:00

View file

@ -76,7 +76,7 @@ int PurgeableVMObject::purge_impl()
for (size_t i = 0; i < m_physical_pages.size(); ++i) {
if (m_physical_pages[i])
++purged_page_count;
m_physical_pages[i] = nullptr;
m_physical_pages[i] = MM.shared_zero_page();
}
m_was_purged = true;