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 Sep 1 2019, 2:01 PM
Parents
rGb21097894e31: Fix initialization of top_fsn.
Branches
Unknown
Tags
Unknown

Event Timeline