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
This commit is contained in:
Shiratori, Takehiro
2018-10-17 15:19:42 +09:00
committed by Dominique Martinet
parent 04e0456232
commit 724e0eb7d0

View File

@ -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;