فهرست منبع

Ignore sync barrier msgs if sync doesn't started

On start of corosync, we can receive sync barrier message. If so,
our sync_ring_id is set to NULL, and memcpy of message ring_id will
segfault. Instead of that, sync barrier message is ignored if
sync_ring_id is NULL.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 13 سال پیش
والد
کامیت
ee292e7968
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      exec/sync.c

+ 6 - 0
exec/sync.c

@@ -392,6 +392,12 @@ static void sync_deliver_fn (
 		sync_endian_convert (req_exec_sync_barrier_start);
 	}
 
+	if (sync_ring_id == NULL) {
+		log_printf (LOGSYS_LEVEL_DEBUG,
+		    "Initial sync was not yet proceed. Ignoring sync msg\n");
+		return ;
+	}
+
 	barrier_completed = 1;
 
 	memcpy (&deliver_ring_id, &req_exec_sync_barrier_start->ring_id,