1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 12:22:08 +00:00

kern: fix UpdateLock perms for ipc

This commit is contained in:
Michael Scire 2020-07-12 22:22:54 -07:00
parent bc767742f7
commit 095fc6b996

View file

@ -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. */