HomeFreeBSD

vfs: stop refing freed mount points in vop_stdgetwritemount

Description

vfs: stop refing freed mount points in vop_stdgetwritemount

The code used blindly ref based on an unsafely red address and then would
backpedal if necessary. This was safe in terms of memory access since
mounts are type-stable, but made for a potential a bug where the mount
was reused and had the count reset to 0 before this code decreased it.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21411

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D21411: vfs: stop refing freed mount points in vop_stdgetwritemount
Parents
rS351655: Fix initialization of top_fsn.
Branches
Unknown
Tags
Unknown