Page MenuHomeFreeBSD

remove process and jail directory machinations from dounmount
ClosedPublic

Authored by avg on Sep 14 2017, 11:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 4:58 AM
Unknown Object (File)
Aug 27 2023, 6:45 AM
Unknown Object (File)
Aug 12 2023, 9:14 PM
Unknown Object (File)
Jun 2 2023, 1:19 AM
Unknown Object (File)
Mar 3 2023, 5:39 AM
Subscribers

Details

Summary

The manipulations done by mountcheckdirs() are not that useful during the unmount,
they can bring about unexpected security consequences.

Thic change effectively reverts the change in r73241.
Discussed with Kirk McKusick.

The change also allows to simplify the handling of rootvnode global variable.

Test Plan

Tested with various explicit force unmount scenarios, with a regular reboot and with reboot -r.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/kern/vfs_mount.c
1372 ↗(On Diff #33061)

(flags & MNT_FORCE) != 0

Why can't you do just rootvnode != NULL && rootvnode->v_mount == mp ?

sys/kern/vfs_mount.c
1372 ↗(On Diff #33061)

You are correct, I can do just that and further simplify the code.
Thanks!

no need to get a root vnode of the mp to check if it is rootvnode

This revision is now accepted and ready to land.Oct 11 2017, 10:50 AM
This revision was automatically updated to reflect the committed changes.