> From: jungle Boogie <jungleboog...@gmail.com> > Date: Tue, 15 Dec 2020 08:07:04 -0800 > > Hi All, > > On my i386 Toshiba netbook machine, I am getting a kernel panic with > the latest i386 snapshot. > > I hope this information helps someone with the issue. > > > show panic > kernel diagnostic assertion "_kernel_lock_held()" failed: > "/usr/src/sys/uvm/uvm_km.c", line 246 > > > bt > db_enter(d0bc6fab,d0c2da31,d0c3a6bb,d0e36b7c,d0e36b7c) at db_enter+0x4 > panic(d0bc6fab, d0c2da31, d0c3a6bb, d0c51f06, f6) at panic+0xd3 > _assert(d0c2da31,d0c51f06,f6,d0c3a6bb,d0e71330) at _assert+0x19 > uvm_km_pgremove(d0e578ec,2552c000,2553000) at uvm_km_pgremove+0x119 > uvm_umap_kill_entry(d0e36b7c,d0e71330) at uvm_unmap_kill_entry+0x92 > uvm_unmap(d0e36b7c,f552c000,f5530000) at uvm_unmap+0x53 > uvm_km_free(d0e36b7c,f552c000,4000,4000) at uvm_km_free+0x25 > cpu_ucode_setup(f092c000,f0800000,efff9000,8d565328,1107000) at > cpu_ucode_setup+0xeb > cpu_startup(8d565328,1107000,1116000,110a000,0) at cpu_startup+0x14a > main(0,0,0,0) at main+0x6b
Does the diff below fix this? Index: arch/i386/i386/ucode.c =================================================================== RCS file: /cvs/src/sys/arch/i386/i386/ucode.c,v retrieving revision 1.2 diff -u -p -r1.2 ucode.c --- arch/i386/i386/ucode.c 28 Jun 2019 21:54:05 -0000 1.2 +++ arch/i386/i386/ucode.c 15 Dec 2020 17:54:37 -0000 @@ -102,7 +102,7 @@ cpu_ucode_setup(void) size = round_page(bios_ucode->uc_size); npages = size / PAGE_SIZE; - va = uvm_km_valloc(kernel_map, size); + va = (vaddr_t)km_alloc(size, &kv_any, &kp_none, &kd_nowait); if (va == 0) return; for (i = 0; i < npages; i++) { @@ -119,7 +119,7 @@ cpu_ucode_setup(void) pmap_remove(pmap_kernel(), va, va + size); pmap_update(pmap_kernel()); - uvm_km_free(kernel_map, va, size); + km_free((void *)va, size, &kv_any, &kp_none); } /*