Kernel: Actually clear page slots in Region::clear_to_zero()

We were copying the RefPtr<PhysicalPage> and zeroing the copy instead
of zeroing the slot itself.
This commit is contained in:
Andreas Kling 2022-01-12 14:49:44 +01:00
commit 5f71925aa4
Notes: sideshowbarker 2024-07-17 21:05:40 +09:00

View file

@ -306,7 +306,7 @@ void Region::clear_to_zero()
VERIFY(vmobject().is_anonymous());
SpinlockLocker locker(vmobject().m_lock);
for (auto i = 0u; i < page_count(); ++i) {
auto page = physical_page_slot(i);
auto& page = physical_page_slot(i);
VERIFY(page);
if (page->is_shared_zero_page())
continue;