On Tue, Jul 12, 2016 at 12:55:50PM -0600, Todd C. Miller wrote: > On Tue, 12 Jul 2016 07:22:57 -1000, Tim Newsham wrote: > > > Here's another root-only (unless kern.usermount is set) panic issue. We > > exercise it through tmpfs but it might be more general than that. We're > > not sure what the proper remediation should be here. > > The only valid flag for umount(2) is MNT_FORCE.
OK bluhm@ > > - todd > > Index: vfs_syscalls.c > =================================================================== > RCS file: /cvs/src/sys/kern/vfs_syscalls.c,v > retrieving revision 1.261 > diff -u -p -u -r1.261 vfs_syscalls.c > --- vfs_syscalls.c 6 Jul 2016 19:26:35 -0000 1.261 > +++ vfs_syscalls.c 12 Jul 2016 18:55:09 -0000 > @@ -412,7 +412,7 @@ sys_unmount(struct proc *p, void *v, reg > 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)); > } > > /*