- Push down Giant into the sysarch() calls that still need Giant.
- Standardize on EINVAL rather than EOPNOTSUPP if the sysarch op value is invalid.
This commit is contained in:
parent
17b8a8a77a
commit
7ff022c485
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114029
@ -77,7 +77,7 @@ sysarch(td, uap)
|
||||
struct thread *td;
|
||||
register struct sysarch_args *uap;
|
||||
{
|
||||
int error = 0;
|
||||
int error;
|
||||
|
||||
switch(uap->op) {
|
||||
case ALPHA_SETHAE:
|
||||
|
@ -88,8 +88,9 @@ sysarch(td, uap)
|
||||
struct thread *td;
|
||||
register struct sysarch_args *uap;
|
||||
{
|
||||
int error = 0;
|
||||
int error;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
switch(uap->op) {
|
||||
case I386_GET_LDT:
|
||||
error = i386_get_ldt(td, uap->parms);
|
||||
@ -108,9 +109,10 @@ sysarch(td, uap)
|
||||
error = vm86_sysarch(td, uap->parms);
|
||||
break;
|
||||
default:
|
||||
error = EOPNOTSUPP;
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -88,8 +88,9 @@ sysarch(td, uap)
|
||||
struct thread *td;
|
||||
register struct sysarch_args *uap;
|
||||
{
|
||||
int error = 0;
|
||||
int error;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
switch(uap->op) {
|
||||
case I386_GET_LDT:
|
||||
error = i386_get_ldt(td, uap->parms);
|
||||
@ -108,9 +109,10 @@ sysarch(td, uap)
|
||||
error = vm86_sysarch(td, uap->parms);
|
||||
break;
|
||||
default:
|
||||
error = EOPNOTSUPP;
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ sysarch(td, uap)
|
||||
struct thread *td;
|
||||
register struct sysarch_args *uap;
|
||||
{
|
||||
int error = 0;
|
||||
int error;
|
||||
|
||||
switch(uap->op) {
|
||||
default:
|
||||
|
@ -35,5 +35,5 @@ int
|
||||
sysarch(struct thread *td, struct sysarch_args *uap)
|
||||
{
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
@ -28,7 +28,9 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/sysproto.h>
|
||||
|
||||
@ -50,7 +52,7 @@ sysarch(struct thread *td, struct sysarch_args *uap)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = 0;
|
||||
mtx_lock(&Giant);
|
||||
switch (uap->op) {
|
||||
case SPARC_SIGTRAMP_INSTALL:
|
||||
error = sparc_sigtramp_install(td, uap->parms);
|
||||
@ -62,6 +64,7 @@ sysarch(struct thread *td, struct sysarch_args *uap)
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
mtx_unlock(&Giant);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user