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)
Sat, Nov 30, 3:01 PM
Unknown Object (File)
Sep 8 2024, 9:08 AM
Unknown Object (File)
Aug 17 2024, 11:07 AM
Unknown Object (File)
Aug 10 2024, 9:08 PM
Unknown Object (File)
Aug 9 2024, 11:40 PM
Unknown Object (File)
Aug 5 2024, 9:50 PM
Unknown Object (File)
Aug 5 2024, 9:05 PM
Unknown Object (File)
Aug 4 2024, 4:01 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 Passed
Unit
No Test Coverage
Build Status
Buildable 11585
Build 11938: arc lint + arc unit

Event Timeline

sys/kern/vfs_mount.c
1366–1367

(flags & MNT_FORCE) != 0

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

sys/kern/vfs_mount.c
1366–1367

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.