mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Eliminate two useracc(..., VM_PROT_READ) calls that immediately precede
copyin() calls. Submitted by: bde
This commit is contained in:
parent
deee919e7e
commit
2bf93af129
1 changed files with 4 additions and 8 deletions
|
|
@ -1418,11 +1418,9 @@ osigreturn(struct proc *p,
|
|||
return (EINVAL);
|
||||
|
||||
/*
|
||||
* Test and fetch the context structure.
|
||||
* We grab it all at once for speed.
|
||||
* Fetch the entire context structure at once for speed.
|
||||
*/
|
||||
if (useracc((caddr_t)scp, sizeof (*scp), VM_PROT_READ) == 0 ||
|
||||
copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc))
|
||||
if (copyin((caddr_t)scp, (caddr_t)&ksc, sizeof ksc))
|
||||
return (EINVAL);
|
||||
|
||||
/*
|
||||
|
|
@ -1488,11 +1486,9 @@ sigreturn(struct proc *p,
|
|||
return (EINVAL);
|
||||
|
||||
/*
|
||||
* Test and fetch the context structure.
|
||||
* We grab it all at once for speed.
|
||||
* Fetch the entire context structure at once for speed.
|
||||
*/
|
||||
if (useracc((caddr_t)ucp, sizeof(ucontext_t), VM_PROT_READ) == 0 ||
|
||||
copyin((caddr_t)ucp, (caddr_t)&uc, sizeof(ucontext_t)))
|
||||
if (copyin((caddr_t)ucp, (caddr_t)&uc, sizeof(ucontext_t)))
|
||||
return (EINVAL);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue