DragonFly BSD
DragonFly bugs List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: panic: kmem_slab_alloc: bad flags 00000104


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Sun, 18 Apr 2004 13:53:22 +0200

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;


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