From 5e3339e8666efcbf464a50eda32ad3499098f857 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 11 Jul 2021 21:59:06 -0700 Subject: [PATCH] kern: add missing abort on unmap failure --- libraries/libmesosphere/source/kern_k_device_address_space.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libmesosphere/source/kern_k_device_address_space.cpp b/libraries/libmesosphere/source/kern_k_device_address_space.cpp index 401a1c9cd..2d474ef67 100644 --- a/libraries/libmesosphere/source/kern_k_device_address_space.cpp +++ b/libraries/libmesosphere/source/kern_k_device_address_space.cpp @@ -120,7 +120,7 @@ namespace ams::kern { /* If we fail to unmap, we want to do a partial unlock. */ { - auto unlock_guard = SCOPE_GUARD { page_table->UnlockForDeviceAddressSpacePartialMap(process_address, size, size); }; + auto unlock_guard = SCOPE_GUARD { MESOSPHERE_R_ABORT_UNLESS(page_table->UnlockForDeviceAddressSpacePartialMap(process_address, size, size)); }; /* Unmap. */ R_TRY(m_table.Unmap(page_table, process_address, size, device_address));