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
F106872481: D42527.gt.diff
Mon, Jan 6, 6:09 PM
Unknown Object (File)
Mon, Dec 9, 3:18 AM
Unknown Object (File)
Dec 4 2024, 11:32 AM
Unknown Object (File)
Dec 2 2024, 7:01 AM
Unknown Object (File)
Nov 25 2024, 1:51 AM
Unknown Object (File)
Nov 22 2024, 7:07 AM
Unknown Object (File)
Nov 20 2024, 3:37 PM
Unknown Object (File)
Nov 11 2024, 6:26 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.