Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2021 11:26:47 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 255041] panic: system freeze/panic with D29125 patch
Message-ID:  <bug-255041-227-k86XjmUsLW@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255041-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255041-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255041

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

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

--- Comment #1 from Mark Millard <marklmi26-fbsd@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_t=
ype
*mtp,
 #ifdef EPOCH_TRACE
                        epoch_trace_list(curthread);
 #endif
-                       KASSERT(1,=20
+                       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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255041-227-k86XjmUsLW>