mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Kernel: Skip setting region name if none is given to mmap
This keeps us from accidentally overwriting an already set region name, for example when we are mapping a file (as, in this case, the file name is already stored in the region).
This commit is contained in:
parent
00b8ce4a6d
commit
a1686db2de
|
@ -240,6 +240,7 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
|
|||
region->set_shared(true);
|
||||
if (map_stack)
|
||||
region->set_stack(true);
|
||||
if (name)
|
||||
region->set_name(move(name));
|
||||
|
||||
PerformanceManager::add_mmap_perf_event(*this, *region);
|
||||
|
|
Loading…
Reference in a new issue