Page MenuHomeFreeBSD

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

Authored by zlei on Nov 9 2023, 10:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 22, 12:56 AM
Unknown Object (File)
Sat, Feb 17, 3:54 AM
Unknown Object (File)
Dec 23 2023, 3:16 AM
Unknown Object (File)
Dec 21 2023, 8:25 PM
Unknown Object (File)
Dec 19 2023, 11:45 PM
Unknown Object (File)
Dec 13 2023, 6:09 AM
Unknown Object (File)
Nov 22 2023, 3:04 AM
Unknown Object (File)
Nov 21 2023, 11:18 PM

Details

Reviewers
dfr
kib
dab
jhb
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 Skipped
Unit
Tests Skipped

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
1229–1231

I think this is more readable.