panic: kmem_slab_alloc: bad flags 00000104

Joerg Sonnenberger joerg at britannica.bec.de
Sun Apr 18 04:58:38 PDT 2004


On Sun, Apr 18, 2004 at 12:18:18AM +0200, Richard Nyberg wrote:
> Seems like ip6_addaux uses M_DONTWAIT (defined as 4 in mbuf.h) as flags
> to malloc, but kmem_slab_alloc panics if neither M_RNOWAIT nor M_WAITOK
> is set.

Can you try the attached patch?

Joerg

> 
> 	-Richard
> 
Index: uipc_mbuf2.c
===================================================================
RCS file: /home/joerg/wd/repo/dragonflybsd/src/sys/kern/uipc_mbuf2.c,v
retrieving revision 1.4
diff -u -r1.4 uipc_mbuf2.c
--- uipc_mbuf2.c	26 Aug 2003 21:09:02 -0000	1.4
+++ uipc_mbuf2.c	18 Apr 2004 11:50:57 -0000
@@ -300,7 +300,8 @@
 
 	if (len < 0)
 		return NULL;
-	t = malloc(len + sizeof(struct m_tag), M_PACKET_TAGS, wait);
+	t = malloc(len + sizeof(struct m_tag), M_PACKET_TAGS,
+		   wait != M_WAIT ? M_NOWAIT : M_WAITOK);
 	if (t == NULL)
 		return NULL;
 	t->m_tag_id = type;




More information about the Bugs mailing list