Kernel: Page allocation should not use memset_user() when zeroing

We're not zeroing new pages through a userspace address, so this should
not use memset_user().
This commit is contained in:
Andreas Kling 2020-01-10 06:59:01 +01:00
parent 197e73ee31
commit 62c45850e1
Notes: sideshowbarker 2024-07-19 10:14:11 +09:00

View file

@ -496,7 +496,7 @@ RefPtr<PhysicalPage> MemoryManager::allocate_user_physical_page(ShouldZeroFill s
if (should_zero_fill == ShouldZeroFill::Yes) {
auto* ptr = (u32*)quickmap_page(*page);
memset_user(ptr, 0, PAGE_SIZE);
memset(ptr, 0, PAGE_SIZE);
unquickmap_page();
}