[Bug 255041] panic: system freeze/panic with D29125 patch

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Apr 14 11:26:47 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255041

Mark Millard <marklmi26-fbsd at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marklmi26-fbsd at yahoo.com

--- Comment #1 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
Looks like 1ae20f7c70e is a detection of inappropriate use
of M_WAITOK in a context where it is not allowed because
it might sleep when sleeping is not allowed:

diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 48383358e3ad..0d6f9dcfcab7 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -537,7 +537,7 @@ malloc_dbg(caddr_t *vap, size_t *sizep, struct malloc_type
*mtp,
 #ifdef EPOCH_TRACE
                        epoch_trace_list(curthread);
 #endif
-                       KASSERT(1, 
+                       KASSERT(0,
                            ("malloc(M_WAITOK) with sleeping prohibited"));
                }
        }

Letting the inappropriate activity happen by reverting the change
does not look reasonable from what I can tell. (Not that I'm
expert, however.)

More likely the context needs to be analyzed for what allocation
is happening in what kind of restricted context and then, with
that information, a fix that avoids the bad type of activity
would be developed. It is not obvious what all code would need
to change at this point.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list