Copyout a whole int to cpuset_domain's policy pointer.
The previous code only copied 16-bits and corrupted the target int. Reviewed by: kib, markj Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14611
This commit is contained in:
parent
d7fb35d13a
commit
dd51fec3b9
@ -1972,8 +1972,8 @@ kern_cpuset_getdomain(struct thread *td, cpulevel_t level, cpuwhich_t which,
|
||||
if (error == 0)
|
||||
error = copyout(mask, maskp, domainsetsize);
|
||||
if (error == 0)
|
||||
error = copyout(&outset.ds_policy, policyp,
|
||||
sizeof(outset.ds_policy));
|
||||
if (suword32(policyp, outset.ds_policy) != 0)
|
||||
error = EFAULT;
|
||||
out:
|
||||
free(mask, M_TEMP);
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user