1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Small cleanups to the handling of Giant in trap().

This commit is contained in:
John Baldwin 2001-10-17 21:55:56 +00:00
parent c479a8493c
commit c006932186
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85081

View File

@ -311,11 +311,10 @@ trap(a0, a1, a2, entry, framep)
*/
if (user) {
mtx_lock(&Giant);
if ((i = unaligned_fixup(a0, a1, a2, td)) == 0) {
mtx_unlock(&Giant);
goto out;
}
i = unaligned_fixup(a0, a1, a2, td);
mtx_unlock(&Giant);
if (i == 0)
goto out;
ucode = a0; /* VA */
break;
}
@ -572,12 +571,10 @@ trap(a0, a1, a2, entry, framep)
} else if (rv == KERN_PROTECTION_FAILURE)
rv = KERN_INVALID_ADDRESS;
}
if (rv == KERN_SUCCESS) {
mtx_unlock(&Giant);
goto out;
}
mtx_unlock(&Giant);
if (rv == KERN_SUCCESS)
goto out;
if (!user) {
/* Check for copyin/copyout fault */
if (td != NULL &&