diff options
| author | 2019-07-11 14:57:20 -0400 | |
|---|---|---|
| committer | 2019-07-11 14:57:20 -0400 | |
| commit | 79c382fafd81ec5ca42c825a2f1abd53799faf50 (patch) | |
| tree | c8ec8c369e1feeb02005920e96ef49fc87bf5596 /src/core/hle/kernel | |
| parent | Merge pull request #2723 from lioncash/mem (diff) | |
| parent | Restore memory perms on svcUnmapMemory/UnloadNro (diff) | |
| download | yuzu-79c382fafd81ec5ca42c825a2f1abd53799faf50.tar.gz yuzu-79c382fafd81ec5ca42c825a2f1abd53799faf50.tar.xz yuzu-79c382fafd81ec5ca42c825a2f1abd53799faf50.zip | |
Merge pull request #2717 from SciresM/unmirror_memory
Restore memory perms on svcUnmapMemory/UnloadNro
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 9 |
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 | |||
| 318 | return result; | 318 | return result; |
| 319 | } | 319 | } |
| 320 | 320 | ||
| 321 | return vm_manager.UnmapRange(dst_addr, size); | 321 | const auto unmap_res = vm_manager.UnmapRange(dst_addr, size); |
| 322 | |||
| 323 | // Reprotect the source mapping on success | ||
| 324 | if (unmap_res.IsSuccess()) { | ||
| 325 | ASSERT(vm_manager.ReprotectRange(src_addr, size, VMAPermission::ReadWrite).IsSuccess()); | ||
| 326 | } | ||
| 327 | |||
| 328 | return unmap_res; | ||
| 322 | } | 329 | } |
| 323 | 330 | ||
| 324 | /// Connect to an OS service given the port name, returns the handle to the port to out | 331 | /// Connect to an OS service given the port name, returns the handle to the port to out |