summaryrefslogtreecommitdiff
path: root/Kernel/Memory/AddressSpace.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-02-10 19:17:27 +0200
committerIdan Horowitz <idan.horowitz@gmail.com>2022-02-11 17:49:46 +0200
commit8030e2a88f8b6c9a78ac9734fb2c08071f8d3d70 (patch)
tree1594298791eda6cd9f8bda44843b2bce91049f40 /Kernel/Memory/AddressSpace.cpp
parent871a53db760a975a6aa3510b1a5b355152eaa2ef (diff)
downloadserenity-8030e2a88f8b6c9a78ac9734fb2c08071f8d3d70.zip
Kernel: Make AnonymousVMObject COW-Bitmap allocation OOM-fallible
Diffstat (limited to 'Kernel/Memory/AddressSpace.cpp')
-rw-r--r--Kernel/Memory/AddressSpace.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp
index ea47ee91a3..abd33bfa4d 100644
--- a/Kernel/Memory/AddressSpace.cpp
+++ b/Kernel/Memory/AddressSpace.cpp
@@ -153,7 +153,7 @@ ErrorOr<Region*> AddressSpace::try_allocate_split_region(Region const& source_re
size_t page_offset_in_source_region = (offset_in_vmobject - source_region.offset_in_vmobject()) / PAGE_SIZE;
for (size_t i = 0; i < region->page_count(); ++i) {
if (source_region.should_cow(page_offset_in_source_region + i))
- region->set_should_cow(i, true);
+ TRY(region->set_should_cow(i, true));
}
return region;
}