mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
Kernel: Always observe the return value of Region::map and remap
We have seen cases where the map fails, but we return the region to the caller, causing them to page fault later on when they touch the region. The fix is to always observe the return code of map/remap.
This commit is contained in:
committed by
Andreas Kling
parent
0ae5de8c3c
commit
485f51690d
@@ -748,7 +748,8 @@ OwnPtr<Region> MemoryManager::allocate_kernel_region_with_vmobject(VirtualRange
|
||||
return {};
|
||||
|
||||
auto region = maybe_region.release_value();
|
||||
region->map(kernel_page_directory());
|
||||
if (!region->map(kernel_page_directory()))
|
||||
return {};
|
||||
return region;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user