if_dc.c causes page fault while in kernel mode; coredump; reproducible

Gleb Smirnoff glebius at FreeBSD.org
Mon Dec 26 16:12:33 PST 2005


  Martin,

  please try out the attached patch.

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
-------------- next part --------------
Index: if_dc.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/dc/if_dc.c,v
retrieving revision 1.176
diff -u -r1.176 if_dc.c
--- if_dc.c	5 Dec 2005 12:32:20 -0000	1.176
+++ if_dc.c	27 Dec 2005 00:10:54 -0000
@@ -3138,8 +3138,9 @@
 	/* Disable interrupts. */
 	CSR_WRITE_4(sc, DC_IMR, 0x00000000);
 
-	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS)
-	      && status != 0xFFFFFFFF) {
+	while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) &&
+	    status != 0xFFFFFFFF &&
+	    ifp->if_drv_flags & IFF_DRV_RUNNING) {
 
 		CSR_WRITE_4(sc, DC_ISR, status);
 


More information about the freebsd-current mailing list