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

Re: cvs commit: src/sys/i386/isa apic_vector.s clock.c src/sys/kern kern_intr.c kern_sig.c kern_slaballoc.c kern_switch.c kern_systimer.c kern_upcall.c lwkt_msgport.c lwkt_thread.c lwkt_token.c src/sys/sys slaballoc.h


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Feb 2004 15:34:46 -0800 (PST)

:I'm sorry to have spammed the commits@ list, moving to bugs@.
:I've found the path to the panic:
:mi_startup
:-> scmeminit
:   -> sc_alloc_scr_buffer
:      -> sc_vtb_copy
:         -> sc_vtb_init, malloc failed because of M_NOWAIT flag
:         -> bcopy to null pointer and panic
:
:I'm still not sure why it failed only when the kernel is compiled with gcc2.

    All right.  Try the patch below.  

    I will have to spend a day fixing all the misuses of M_NOWAIT in the
    kernel that were inherited from FreeBSD-4.  FreeBSD-5 has the same 
    problem, actually. The difference between FreeBSD and DragonFly is 
    that in DragonFly M_NOWAIT really means "don't wait, and be prepared
    to handle a NULL return value", whereas in FreeBSD it means "I don't
    want you to wait but I also sorta hope you won't ever return NULL".

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>

Index: syscons.c
===================================================================
RCS file: /cvs/src/sys/dev/misc/syscons/syscons.c,v
retrieving revision 1.7
diff -u -r1.7 syscons.c
--- syscons.c	7 Aug 2003 21:16:59 -0000	1.7
+++ syscons.c	18 Feb 2004 23:31:55 -0000
@@ -413,15 +413,15 @@
 	return;
 
     /* copy the temporary buffer to the final buffer */
-    sc_alloc_scr_buffer(sc_console, FALSE, FALSE);
+    sc_alloc_scr_buffer(sc_console, TRUE, FALSE);
 
 #ifndef SC_NO_CUTPASTE
-    sc_alloc_cut_buffer(sc_console, FALSE);
+    sc_alloc_cut_buffer(sc_console, TRUE);
 #endif
 
 #ifndef SC_NO_HISTORY
     /* initialize history buffer & pointers */
-    sc_alloc_history_buffer(sc_console, 0, 0, FALSE);
+    sc_alloc_history_buffer(sc_console, 0, 0, TRUE);
 #endif
 }
 



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