summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorMichael Scire <SciresM@gmail.com>2019-07-11 10:38:28 +0200
committerMichael Scire <SciresM@gmail.com>2019-07-11 10:38:28 +0200
commit072a9796f51a11a72c71f415562fdfd7fe6af6d3 (patch)
tree9e653f206c6668f04d14a9d96e35ad1fee563ff7 /src/core/hle/kernel
parentMerge pull request #2714 from DarkLordZach/repo-sync-pipeline (diff)
downloadyuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar.gz
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar.bz2
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar.lz
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar.xz
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.tar.zst
yuzu-072a9796f51a11a72c71f415562fdfd7fe6af6d3.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 332573a95..58374f829 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -318,7 +318,14 @@ static ResultCode UnmapMemory(Core::System& system, VAddr dst_addr, VAddr src_ad
return result;
}
- return vm_manager.UnmapRange(dst_addr, size);
+ const auto unmap_res = vm_manager.UnmapRange(dst_addr, size);
+
+ // Reprotect the source mapping on success
+ if (unmap_res.IsSuccess()) {
+ ASSERT(vm_manager.ReprotectRange(src_addr, size, VMAPermission::ReadWrite).IsSuccess());
+ }
+
+ return unmap_res;
}
/// Connect to an OS service given the port name, returns the handle to the port to out