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)
(cherry picked from commit f1994d1eb215a2b7cb644329797dc623ec883120)

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
rG092dd9545f65: ddp: Clear active DDP buffer members to NULL to pacify an assertion
Branches
Unknown
Tags
Unknown