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

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
parent d8206c1059
commit 5f71925aa4

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;