Grab Giant around fault handling at the top level for now.

This commit is contained in:
John Baldwin 2001-06-29 04:18:59 +00:00
parent 92809bc001
commit f052203eed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78947

View File

@ -523,6 +523,7 @@ trap(a0, a1, a2, entry, framep)
goto out;
}
mtx_lock(&Giant);
/*
* It is only a kernel address space fault iff:
* 1. !user and
@ -629,9 +630,11 @@ trap(a0, a1, a2, entry, framep)
rv = KERN_INVALID_ADDRESS;
}
if (rv == KERN_SUCCESS) {
mtx_unlock(&Giant);
goto out;
}
mtx_unlock(&Giant);
if (!user) {
/* Check for copyin/copyout fault */
if (p != NULL &&