HomeFreeBSD

kern linker: Do not unload a module if it has dependants

Description

kern linker: Do not unload a module if it has dependants

Despite the name, linker_file_unload() will drop a reference and return
success when the module file has dependants, i.e. it has more than one
reference. When user request to unload such modules then the kernel
should reject unambiguously and immediately.

PR: 274986
Reviewed by: dfr, dab, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D42527

(cherry picked from commit f43ff3e15c8b4b161ce09c8ab008abc4222db26b)

Details

Provenance
zleiAuthored on Mar 26 2024, 3:55 AM
Reviewer
dfr
Differential Revision
D42527: kern linker: Do not try to unload module if it has dependants
Parents
rG7748f70561f3: cxgbe tom: Handle a race condition when enabling TLS offload
Branches
Unknown
Tags
Unknown