Page MenuHomeFreeBSD

kern linker: Do not try to unload module if it has dependants
ClosedPublic

Authored by zlei on Nov 9 2023, 10:06 AM.
Tags
None
Referenced Files
F154694116: D42527.diff
Wed, Apr 29, 6:11 AM
Unknown Object (File)
Mon, Apr 27, 4:12 PM
Unknown Object (File)
Mon, Apr 27, 10:35 AM
Unknown Object (File)
Sat, Apr 25, 7:52 AM
Unknown Object (File)
Fri, Apr 24, 6:29 AM
Unknown Object (File)
Thu, Apr 23, 8:05 AM
Unknown Object (File)
Sun, Apr 19, 9:32 PM
Unknown Object (File)
Sat, Apr 18, 11:06 PM

Details

Summary

linker_file_unload() will just drop a reference in case the module have more than one
references. For user requested unload, we are going to unload but not just to drop a
reference.

PR: 274986
MFC after: 2 weeks

Test Plan
# kldload bridgestp
# kldload if_bridge
# kldunload bridgestp
kldunload: can't unload file: Device busy

Diff Detail

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

Event Timeline

zlei requested review of this revision.Nov 9 2023, 10:06 AM
This revision is now accepted and ready to land.Nov 9 2023, 3:46 PM
jhb added a subscriber: jhb.
jhb added inline comments.
sys/kern/kern_linker.c
1285–1286

I think this is more readable.