mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-26 19:32:06 -05: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
1 changed files with 2 additions and 1 deletions
|
@ -240,7 +240,8 @@ ErrorOr<FlatPtr> Process::sys$mmap(Userspace<Syscall::SC_mmap_params const*> use
|
|||
region->set_shared(true);
|
||||
if (map_stack)
|
||||
region->set_stack(true);
|
||||
region->set_name(move(name));
|
||||
if (name)
|
||||
region->set_name(move(name));
|
||||
|
||||
PerformanceManager::add_mmap_perf_event(*this, *region);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue