projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
e6bb584
)
kernel - mlockall: Return EINVAL for invalid flags combinations.
author
Venkatesh Srinivas <me@endeavour.zapto.org>
Sun, 5 Dec 2010 04:40:22 +0000 (20:40 -0800)
committer
Venkatesh Srinivas <me@endeavour.zapto.org>
Sun, 5 Dec 2010 04:40:22 +0000 (20:40 -0800)
Reported by: swildner
sys/vm/vm_mmap.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/vm/vm_mmap.c
b/sys/vm/vm_mmap.c
index
9409a97
..
1c0d339
100644
(file)
--- a/
sys/vm/vm_mmap.c
+++ b/
sys/vm/vm_mmap.c
@@
-1031,6
+1031,9
@@
sys_mlockall(struct mlockall_args *uap)
int how = uap->how;
int rc = KERN_SUCCESS;
+ if (((how & MCL_CURRENT) == 0) && ((how & MCL_FUTURE) == 0))
+ return (EINVAL);
+
rc = priv_check_cred(td->td_ucred, PRIV_ROOT, 0);
if (rc)
return (rc);