Page MenuHomeFreeBSD

vfs_unregister: fix error handling
ClosedPublic

Authored by vangyzen on Feb 25 2022, 3:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 1 2025, 6:41 AM
Unknown Object (File)
Nov 27 2025, 6:51 AM
Unknown Object (File)
Nov 21 2025, 4:46 AM
Unknown Object (File)
Nov 18 2025, 5:53 AM
Unknown Object (File)
Nov 18 2025, 4:18 AM
Unknown Object (File)
Nov 10 2025, 1:36 PM
Unknown Object (File)
Oct 29 2025, 7:11 AM
Unknown Object (File)
Oct 29 2025, 5:47 AM
Subscribers

Details

Summary

Due to misplaced braces, an error from vfs_uninit() in the VFCF_SBDRY
case was ignored.

Reported by: Anton Rang <rang@acm.org>
MFC after: 1 week
Sponsored by: Dell EMC Isilon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 25 2022, 3:44 PM

Because of this bug, the nfs VFS module was incorrectly unloaded. However, the nfscl module still refused to unload, so the result was mostly harmless, meaning the kernel didn't panic. The worst effect was, NFS was no longer listed as a VFS, so no NFS mounts could be created until the next reboot. Amusingly, kldload failed with EOPNOTSUPP before and after the fix, so I had to use dtrace to see the difference.

This revision was automatically updated to reflect the committed changes.