Add error checking for copyin() operations in posix4 scheduling code.

This commit is contained in:
Robert Watson 2001-06-28 22:53:42 +00:00
parent 0b597242ad
commit e8f7a95298
2 changed files with 12 additions and 4 deletions

View File

@ -169,7 +169,9 @@ int sched_setparam(struct proc *p,
int e;
struct sched_param sched_param;
copyin(uap->param, &sched_param, sizeof(sched_param));
e = copyin(uap->param, &sched_param, sizeof(sched_param));
if (e)
return (e);
(void) (0
|| (e = p31b_proc(p, uap->pid, &p))
@ -202,7 +204,9 @@ int sched_setscheduler(struct proc *p,
int e;
struct sched_param sched_param;
copyin(uap->param, &sched_param, sizeof(sched_param));
e = copyin(uap->param, &sched_param, sizeof(sched_param));
if (e)
return (e);
(void) (0
|| (e = p31b_proc(p, uap->pid, &p))

View File

@ -169,7 +169,9 @@ int sched_setparam(struct proc *p,
int e;
struct sched_param sched_param;
copyin(uap->param, &sched_param, sizeof(sched_param));
e = copyin(uap->param, &sched_param, sizeof(sched_param));
if (e)
return (e);
(void) (0
|| (e = p31b_proc(p, uap->pid, &p))
@ -202,7 +204,9 @@ int sched_setscheduler(struct proc *p,
int e;
struct sched_param sched_param;
copyin(uap->param, &sched_param, sizeof(sched_param));
e = copyin(uap->param, &sched_param, sizeof(sched_param));
if (e)
return (e);
(void) (0
|| (e = p31b_proc(p, uap->pid, &p))