During overload conditions of the IPC system and the usage of the timer
system by ipc threads and totem threads simultaneously, a lock ordering
condition was found resulting in complete deadlock.

Patch attached to fix.
Index: exec/timer.c
===================================================================
--- exec/timer.c	(revision 1641)
+++ exec/timer.c	(working copy)
@@ -126,13 +126,13 @@
 		if (fds == -1) {
 			goto retry_poll;
 		}
+		timer_serialize_lock_fn ();
 		pthread_mutex_lock (&timer_mutex);
-		timer_serialize_lock_fn ();
 
 		timerlist_expire (&timers_timerlist);
 		
+		pthread_mutex_unlock (&timer_mutex);
 		timer_serialize_unlock_fn ();
-		pthread_mutex_unlock (&timer_mutex);
 	}
 
 	pthread_exit (0);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to