mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 07:18:51 +00:00
Kernel: Make SharedInodeVMObject allocation OOM-safe
This commit is contained in:
parent
59049ae4b7
commit
af8c74a328
Notes:
sideshowbarker
2024-07-18 09:19:25 +09:00
Author: https://github.com/awesomekling
Commit: af8c74a328
4 changed files with 17 additions and 6 deletions
|
@ -97,7 +97,7 @@ KResultOr<Region*> InodeFile::mmap(Process& process, FileDescription& descriptio
|
|||
// FIXME: If PROT_EXEC, check that the underlying file system isn't mounted noexec.
|
||||
RefPtr<InodeVMObject> vmobject;
|
||||
if (shared)
|
||||
vmobject = SharedInodeVMObject::create_with_inode(inode());
|
||||
vmobject = SharedInodeVMObject::try_create_with_inode(inode());
|
||||
else
|
||||
vmobject = PrivateInodeVMObject::create_with_inode(inode());
|
||||
if (!vmobject)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue