Page MenuHomeFreeBSD

remove process and jail directory machinations from dounmount

Authored by avg on Sep 14 2017, 11:54 AM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

avg created this revision.Sep 14 2017, 11:54 AM
kib added inline comments.Sep 14 2017, 1:54 PM
1372 ↗(On Diff #33061)

(flags & MNT_FORCE) != 0

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

avg added inline comments.Sep 15 2017, 2:05 PM
1372 ↗(On Diff #33061)

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

avg updated this revision to Diff 33108.Sep 15 2017, 2:10 PM

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

trasz accepted this revision.Oct 11 2017, 10:50 AM
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.