diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-10 19:17:27 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-11 17:49:46 +0200 |
commit | 8030e2a88f8b6c9a78ac9734fb2c08071f8d3d70 (patch) | |
tree | 1594298791eda6cd9f8bda44843b2bce91049f40 /Kernel/Memory/AddressSpace.cpp | |
parent | 871a53db760a975a6aa3510b1a5b355152eaa2ef (diff) | |
download | serenity-8030e2a88f8b6c9a78ac9734fb2c08071f8d3d70.zip |
Kernel: Make AnonymousVMObject COW-Bitmap allocation OOM-fallible
Diffstat (limited to 'Kernel/Memory/AddressSpace.cpp')
-rw-r--r-- | Kernel/Memory/AddressSpace.cpp | 2 |
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; } |