diff options
author | jhb <jhb@FreeBSD.org> | 2015-01-08 19:11:14 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-01-08 19:11:14 +0000 |
commit | 8189659be8e499f37c87fdd05ef5ec9f88619d56 (patch) | |
tree | 36b1130ba698429a1d932e724745f1de539424ce | |
parent | ff98ff6dcd38e6f1b2d5f46b37497f11da86fd0a (diff) | |
download | FreeBSD-src-8189659be8e499f37c87fdd05ef5ec9f88619d56.zip FreeBSD-src-8189659be8e499f37c87fdd05ef5ec9f88619d56.tar.gz |
Reject attempts to read the cpuset mask of a negative domain ID.
-rw-r--r-- | sys/kern/kern_cpuset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index d18c89e..47845ef 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -1118,7 +1118,7 @@ sys_cpuset_getaffinity(struct thread *td, struct cpuset_getaffinity_args *uap) error = intr_getaffinity(uap->id, mask); break; case CPU_WHICH_DOMAIN: - if (uap->id >= vm_ndomains) + if (uap->id < 0 || uap->id >= vm_ndomains) error = ESRCH; else CPU_COPY(&cpuset_domain[uap->id], mask); |