diff options
author | phk <phk@FreeBSD.org> | 2005-01-04 07:52:26 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-04 07:52:26 +0000 |
commit | 9799def1bc745b61ab8e5425e0a74c23b19f9afd (patch) | |
tree | 081af47d16a4ab5901286d5f9307c337c7011811 /sys | |
parent | ff195385ae8cb3e9e84287fe2bc5abd3688d3a7a (diff) | |
download | FreeBSD-src-9799def1bc745b61ab8e5425e0a74c23b19f9afd.zip FreeBSD-src-9799def1bc745b61ab8e5425e0a74c23b19f9afd.tar.gz |
Unsupport forceful unmounts of DEVFS.
After disscussing things I have decided to take the easy and
consistent 90% solution instead of aiming for the very involved 99%
solution.
If we allow forceful unmounts of DEVFS we need to decide how to handle
the devices which are in use through this filesystem at the time.
We cannot just readopt the open devices in the main /dev instance since
that would open us to security issues.
For the majority of the devices, this is relatively straightforward
as we can just pretend they got revoke(2)'ed.
Some devices get tricky: /dev/console and /dev/tty for instance
does a sort of recursive open of the real console device. Other devices
may be mmap'ed (kill the processes ?).
And then there are disk devices which are mounted.
The correct thing here would be to recursively unmount the filesystems
mounte from devices from our DEVFS instance (forcefully) and if
this succeeds, complete the forcefully unmount of DEVFS. But if
one of the forceful unmounts fail we cannot complete the forceful
unmount of DEVFS, but we are likely to already have severed a lot
of stuff in the process of trying.
Event attempting this would be a lot of code for a very far out
corner-case which most people would never see or get in touch with.
It's just not worth it.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index 2173398..10c2655 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -122,7 +122,7 @@ devfs_unmount(mp, mntflags, td) fmp = VFSTODEVFS(mp); if (mntflags & MNT_FORCE) - flags |= FORCECLOSE; + return (EOPNOTSUPP); /* There is 1 extra root vnode reference from devfs_mount(). */ error = vflush(mp, 1, flags, td); if (error) |