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:
Brooks Davis 2018-03-09 00:50:40 +00:00
parent d7fb35d13a
commit dd51fec3b9

View File

@ -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);