artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
730979c
)
The only valid flag for unmount(2) is MNT_FORCE, ignore any others.
author
millert
<millert@openbsd.org>
Tue, 12 Jul 2016 20:53:04 +0000
(20:53 +0000)
committer
millert
<millert@openbsd.org>
Tue, 12 Jul 2016 20:53:04 +0000
(20:53 +0000)
Fixes a crash when MNT_DOOMED is passed in the flags to unmount(2)
found by NCC Group. OK bluhm@
sys/kern/vfs_syscalls.c
patch
|
blob
|
history
diff --git
a/sys/kern/vfs_syscalls.c
b/sys/kern/vfs_syscalls.c
index
1b01622
..
0bb23b0
100644
(file)
--- a/
sys/kern/vfs_syscalls.c
+++ b/
sys/kern/vfs_syscalls.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: vfs_syscalls.c,v 1.26
1 2016/07/06 19:26:35
millert Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.26
2 2016/07/12 20:53:04
millert Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@
-412,7
+412,7
@@
sys_unmount(struct proc *p, void *v, register_t *retval)
if (vfs_busy(mp, VB_WRITE|VB_WAIT))
return (EBUSY);
- return (dounmount(mp, SCARG(uap, flags), p, vp));
+ return (dounmount(mp, SCARG(uap, flags)
& MNT_FORCE
, p, vp));
}
/*