- We must not call modlist_lookup() with modname==NULL.
- Don't assume that an already-loaded KLD will definitely contain a given module.
Fixes: db887713de2b ("kldload: Improve error handling")
Differential D57607
kldload: Fix some regressions in linker_load_module() Authored by markj on Tue, Jun 16, 1:51 PM. Tags None Referenced Files
Subscribers
Details
Fixes: db887713de2b ("kldload: Improve error handling")
Diff Detail
Event Timeline
Comment Actions This patch is still wrong. I have to travel today and don't have much time to debug. I will revert the original commit since it causes the test suite to panic: root@freebsd:~ # kldload zfs panic: Assertion mod != NULL failed at /home/markj/sb/main/src/sys/kern/kern_linker.c:2299 cpuid = 4 time = 1781621653 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0xa5/frame 0xfffffe00f15d6130 kdb_backtrace() at kdb_backtrace+0xc6/frame 0xfffffe00f15d6290 vpanic() at vpanic+0x214/frame 0xfffffe00f15d6430 panic() at panic+0xb5/frame 0xfffffe00f15d64f0 linker_load_module() at linker_load_module+0x50f/frame 0xfffffe00f15d6bb0 kern_kldload() at kern_kldload+0x267/frame 0xfffffe00f15d6c70 sys_kldload() at sys_kldload+0xcf/frame 0xfffffe00f15d6d10 amd64_syscall() at amd64_syscall+0x3d5/frame 0xfffffe00f15d6f30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00f15d6f30 --- syscall (304, FreeBSD ELF64, kldload), rip = 0x2a7d2a19f20a, rsp = 0x2a7d27c09258, rbp = 0x2a7d27c097d0 --- KDB: enter: panic [ thread pid 4688 tid 100373 ] Stopped at kdb_enter+0x34: movq $0,0x26ae401(%rip) | ||||||||||||||||||||||||||||||||||||||||||||||