[Spread-cvs] commit: r377 - branches/branch_3_17/daemon

jonathan at spread.org jonathan at spread.org
Sun Nov 19 17:06:13 EST 2006


Author: jonathan
Date: 2006-11-19 17:06:12 -0500 (Sun, 19 Nov 2006)
New Revision: 377

Modified:
   branches/branch_3_17/daemon/Changelog
   branches/branch_3_17/daemon/sp.c
Log:
In sp.c add missing Mutex_unlock() calls
before return(ILLEGAL_MESSAGE) calls. Fix deadlock reported
by Massimo Feola for 3.17.3.


Modified: branches/branch_3_17/daemon/Changelog
===================================================================
--- branches/branch_3_17/daemon/Changelog	2006-11-19 22:05:32 UTC (rev 376)
+++ branches/branch_3_17/daemon/Changelog	2006-11-19 22:06:12 UTC (rev 377)
@@ -1,3 +1,9 @@
+Sun Nov 19 16:54:47 2006  Jonathan Stanton  <jonathan at cnds.jhu.edu>
+
+	* sp.c (SP_scat_receive): Add missing Mutex_unlock() calls
+	before return(ILLEGAL_MESSAGE) calls. Fix deadlock reported
+	by Massimo Feola.
+
 Fri Nov 17 13:43:42 2006  Jonathan Stanton  <jonathan at cnds.jhu.edu>
 
 	* network.c (Net_init): Do not bind to broadcast address

Modified: branches/branch_3_17/daemon/sp.c
===================================================================
--- branches/branch_3_17/daemon/sp.c	2006-11-19 22:05:32 UTC (rev 376)
+++ branches/branch_3_17/daemon/sp.c	2006-11-19 22:06:12 UTC (rev 377)
@@ -1186,6 +1186,7 @@
                                 Sessions[ses].recv_message_saved = 1;
                                 Mutex_unlock( &Struct_mutex );
                         }
+                        Mutex_unlock( &Mbox_mutex[mbox & MAX_MUTEX_MASK][1] );
                         return( ILLEGAL_MESSAGE );
                 }
 		max_mess_len += scat_mess->elements[i].len;
@@ -1195,12 +1196,14 @@
             /* reject this message since it has an impossible (negative) num_groups
              * This is likely to be caused by a malicious attack or memory corruption
              */
+            Mutex_unlock( &Mbox_mutex[mbox & MAX_MUTEX_MASK][1] );
             return( ILLEGAL_MESSAGE );
         }
         if (head_ptr->data_len < 0) {
             /* reject this message since it has an impossible (negative) data_len
              * This is likely to be caused by a malicious attack or memory corruption
              */
+            Mutex_unlock( &Mbox_mutex[mbox & MAX_MUTEX_MASK][1] );
             return( ILLEGAL_MESSAGE );
         }
 




More information about the Spread-cvs mailing list