HomeFreeBSD

vfs: make vfscount refcounting handle possible kld unload

Description

vfs: make vfscount refcounting handle possible kld unload

Make the refcounting occur outside any code that might deref a pointer
to struct vfsconf.

Increment vfc_refcount in vfs_byname(), under vfsconf_lock.
Unref either on early mount failure, before struct mount is
instantiated, or in vfs_mount_destroy().

Reported and reviewed by: kevans
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on Aug 27 2025, 10:24 PM
Parents
rG959806e0a844: Merge commit 7a66a26658f4 from llvm git (by Fangrui Song):
Branches
Unknown
Tags
Unknown