mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-10 07:06:34 +00:00
kern: fix UpdateLock perms for ipc
This commit is contained in:
parent
bc767742f7
commit
095fc6b996
1 changed files with 3 additions and 1 deletions
|
@ -2227,7 +2227,9 @@ namespace ams::kern {
|
|||
|
||||
/* If anything was mapped, ipc-lock the pages. */
|
||||
if (src_map_start < src_map_end) {
|
||||
src_page_table.memory_block_manager.UpdateLock(std::addressof(allocator), src_map_start, (src_map_end - src_map_start) / PageSize, &KMemoryBlock::LockForIpc, KMemoryPermission_None);
|
||||
/* Get the source permission. */
|
||||
const auto src_perm = static_cast<KMemoryPermission>((test_perm == KMemoryPermission_UserReadWrite) ? KMemoryPermission_KernelReadWrite | KMemoryPermission_NotMapped : KMemoryPermission_UserRead);
|
||||
src_page_table.memory_block_manager.UpdateLock(std::addressof(allocator), src_map_start, (src_map_end - src_map_start) / PageSize, &KMemoryBlock::LockForIpc, src_perm);
|
||||
}
|
||||
|
||||
/* We succeeded, so cancel our cleanup guard. */
|
||||
|
|
Loading…
Reference in a new issue