Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kern linker: Do not touch userrefs of the kernel file
A nonzero `userrefs` of a linker file indicates that the file, either loaded from kldload(2) or preloaded, can be unloaded via kldunload(2). As for the kernel file, it can be unloaded by the loader but should not be after initialization. This change fixes regression from d9ce8a4 which incidentally increases `userrefs` of the kernel file. Reviewed by: dfr, dab, jhb Fixes: d9ce8a4 kern_linker: Handle module-loading failures in preloaded .ko files MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42530
- Loading branch information