From 724e0eb7d0e66f924e503da4335a3f995a4e994e Mon Sep 17 00:00:00 2001 From: "Shiratori, Takehiro" Date: Wed, 17 Oct 2018 15:19:42 +0900 Subject: [PATCH] mbind(): Fix memory_range_lock deadlock. Fixed the problem of "return error/goto out" while locking the memory_range_lock in mbind(). Change-Id: I980a7a440f652b60379acae3cb3575211a749774 Fujitsu: POSTK_DEBUG_TEMP_FIX_100 --- kernel/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/syscall.c b/kernel/syscall.c index f8a92b82..9d18d605 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -8619,7 +8619,7 @@ SYSCALL_DECLARE(mbind) error = vm_policy_insert(vm, range_policy); if (error) { kprintf("%s: ERROR: could not insert range: %d\n",__FUNCTION__, error); - return error; + goto unlock_out; } } else { @@ -8645,7 +8645,7 @@ SYSCALL_DECLARE(mbind) error = vm_policy_insert(vm, range_policy); if (error) { kprintf("%s: ERROR: could not insert range: %d\n",__FUNCTION__, error); - return error; + goto unlock_out; } mbind_update_only: @@ -8665,7 +8665,7 @@ mbind_update_only: default: error = -EINVAL; - goto out; + goto unlock_out; } error = 0;