1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:57:44 +00:00

Kernel: Remove an unnecessary cast in sys$execve()

This commit is contained in:
Andreas Kling 2020-12-25 14:16:35 +01:00
parent 9c640e67ac
commit 791b32e3c6

View file

@ -63,7 +63,7 @@ KResultOr<Process::LoadResult> Process::load_elf_object(FileDescription& object_
{
auto& inode = *(object_description.inode());
auto vmobject = SharedInodeVMObject::create_with_inode(inode);
if (static_cast<const SharedInodeVMObject&>(*vmobject).writable_mappings()) {
if (vmobject->writable_mappings()) {
dbgln("Refusing to execute a write-mapped program");
return KResult(-ETXTBSY);
}