spinlock crash
    Matthew Dillon 
    dillon at apollo.backplane.com
       
    Wed Aug 30 17:26:57 PDT 2006
    
    
  
:Received a panic today from -HEAD from sources dated August 16th.
:kernel and core (.12) is being uploaded to leaf.  Should take another 2
:hours or so before the core uploads.
:
:--Peter
    Got it.  It looks like a self-deadlock during the scan.  I think the
    bug is in unp_mark(), it is returning early without unlocking the
    spinlock.
    Try this patch.
						-Matt
Index: kern/uipc_usrreq.c
===================================================================
RCS file: /cvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.27
diff -u -r1.27 uipc_usrreq.c
--- kern/uipc_usrreq.c	12 Aug 2006 00:26:20 -0000	1.27
+++ kern/uipc_usrreq.c	31 Aug 2006 00:18:27 -0000
@@ -1380,10 +1380,10 @@
 
 	if (info->locked_fp != fp)
 		spin_lock_wr(&fp->f_spin);
-	if (fp->f_flag & FMARK)
-		return;
-	++info->defer;
-	fp->f_flag |= (FMARK|FDEFER);
+	if ((fp->f_flag & FMARK) == 0) {
+		++info->defer;
+		fp->f_flag |= (FMARK|FDEFER);
+	}
 	if (info->locked_fp != fp)
 		spin_unlock_wr(&fp->f_spin);
 }
    
    
More information about the Bugs
mailing list