The userland or kernel shall not unload the kernel module.
MFC after: 2 weeks
Differential D42530
kern linker: Do not try to unload kernel zlei on Nov 9 2023, 3:43 PM. Authored by Tags None Referenced Files
Subscribers
Details The userland or kernel shall not unload the kernel module. MFC after: 2 weeks # kldstat Id Refs Address Size Name 1 1 0xffffffff80200000 1d35008 kernel # kldunload kernel kldunload: can't unload file: Device busy
Diff Detail
Event TimelineComment Actions I was about to commit this I found that prior to d9ce8a41eac9 (kern_linker: Handle module-loading failures in preloaded .ko files) the kernel can not be unloaded. CC the author @cem for this. See also discuss at ML https://lists.freebsd.org/archives/freebsd-current/2023-November/004950.html . So this is more a regression than a feature. Comment Actions I tested FreeBSD-11.4-RELEASE-amd64-bootonly.iso which does not have d9ce8a41eac9 ,: # kldunload kernel kldunload: can't unload file: Device busy There is also log kldunload: attempt to unload file that was loaded by the kernel from dmesg. So I can conclude d9ce8a41eac9 introduced regression. Comment Actions Yes, this is a regression from d9ce8a41eac9 and I think this is the right way to fix it.
|