Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic: assertion "!cpu_softintr_p()" failed



On Mon, Oct 02, 2023 at 09:23:59AM +1100, Matthew Green wrote:
> Thomas Klausner writes:
> > panic: kernel diagnostic assertion "!cpu_softintr_p()" failed: file "/usr/src/sys/kern/subr_kmem.c", line 451
> >
> > gdb says:
> >
> > #10 0xffffffff80e3551e in vpanic (fmt=0xffffffff813a1880 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ", ap=ap@entry=0xffffae2110a93e08)
> >     at /usr/src/sys/kern/subr_prf.c:286
> > #11 0xffffffff80ffab6f in kern_assert (fmt=fmt@entry=0xffffffff813a1880 "kernel %sassertion \"%s\" failed: file \"%s\", line %d ")
> >     at /usr/src/sys/lib/libkern/kern_assert.c:51
> > #12 0xffffffff80e27e15 in kmem_free (p=0xffff9afa82af5b80, size=64) at /usr/src/sys/kern/subr_kmem.c:451
> > #13 0xffffffff80df5960 in rw_obj_free (lock=0xffff9afa82af5b80) at /usr/src/sys/kern/kern_rwlock_obj.c:127
> > #14 0xffffffff80d825d3 in uvm_anon_release (anon=<optimized out>) at /usr/src/sys/uvm/uvm_anon.c:385
> 
> i think this is a new bug.  this line changed from:
> 
> 1.11         (ad       12-Sep-23):      pool_cache_put(rw_obj_cache, ro);
> 
> to
> 
> 1.12         (ad       23-Sep-23):      kmem_free(ro, sizeof(*ro));
> 
> i guess it just should be kmem_free_intr(), as pool_cache
> is intr-safe as well.

Thanks, I'll try a kernel with the attached diff.
 Thomas
Index: kern_rwlock_obj.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_rwlock_obj.c,v
retrieving revision 1.12
diff -u -r1.12 kern_rwlock_obj.c
--- kern_rwlock_obj.c	23 Sep 2023 18:21:11 -0000	1.12
+++ kern_rwlock_obj.c	2 Oct 2023 07:51:31 -0000
@@ -124,7 +124,7 @@
 	}
 	membar_acquire();
 	rw_destroy(&ro->ro_lock);
-	kmem_free(ro, sizeof(*ro));
+	kmem_intr_free(ro, sizeof(*ro));
 	return true;
 }
 


Home | Main Index | Thread Index | Old Index