[PATCH 5/6] Change sync_in_process value after trans_ack

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

 



If IPC thread is waiting for allow_send and sync_in_process is changed
before trans_ack, message may be copied to incorrect queue. Solution is
to swap sync_in_process and trans_ack.

Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 exec/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec/main.c b/exec/main.c
index 6c8ea35..45abc9f 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -272,11 +272,11 @@ static void corosync_sync_completed (void)
 {
 	log_printf (LOGSYS_LEVEL_NOTICE,
 		"Completed service synchronization, ready to provide service.\n");
-	sync_in_process = 0;
 	/*
 	 * Inform totem to start using new message queue again
 	 */
 	totempg_trans_ack();
+	sync_in_process = 0;
 }
 
 static int corosync_sync_callbacks_retrieve (int sync_id,
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux