summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-18 20:59:04 +0200
committerAndreas Kling <kling@serenityos.org>2022-08-18 20:59:04 +0200
commite1476788adfd79e9e3f54afba33645c370a82ec5 (patch)
treec253aae0486a0925364637969133ff4f66fcca87 /Kernel/Syscalls
parent81ee870c9be0a97fbb889d16789a19f9d52a773e (diff)
downloadserenity-e1476788adfd79e9e3f54afba33645c370a82ec5.zip
Kernel: Make sys$anon_create() allocate physical pages immediately
This fixes an issue where a sharing process would map the "lazy committed page" early and then get stuck with that page even after it had been replaced in the VMObject by a page fault. Regressed in 27c1135d307efde8d9baef2affb26be568d50263, which made it happen every time with the backing bitmaps used for WebContent.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/anon_create.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp
index 2c57148f1e..334e7e9797 100644
--- a/Kernel/Syscalls/anon_create.cpp
+++ b/Kernel/Syscalls/anon_create.cpp
@@ -26,7 +26,7 @@ ErrorOr<FlatPtr> Process::sys$anon_create(size_t size, int options)
return EINVAL;
auto new_fd = TRY(allocate_fd());
- auto vmobject = TRY(Memory::AnonymousVMObject::try_create_purgeable_with_size(size, AllocationStrategy::Reserve));
+ auto vmobject = TRY(Memory::AnonymousVMObject::try_create_purgeable_with_size(size, AllocationStrategy::AllocateNow));
auto anon_file = TRY(AnonymousFile::try_create(move(vmobject)));
auto description = TRY(OpenFileDescription::try_create(move(anon_file)));