Browse Source

CFG: Prevent CFG orignating messages during SYNC

During SYNC, corosync-cfgtool -R/-H commands can pass through IPC then
send totem messages. This may corrupts
assembly_list_inuse/assembly_list_free if those messages are recedived
after SYNC is done.

The solution is marking related CFG APIs as
CS_LIB_FLOW_CONTROL_REQUIRED.

Signed-off-by: Jason HU <huzhijiang@gmail.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Jason HU 10 years ago
parent
commit
15b2e94cca
1 changed files with 4 additions and 4 deletions
  1. 4 4
      exec/cfg.c

+ 4 - 4
exec/cfg.c

@@ -177,15 +177,15 @@ static struct corosync_lib_handler cfg_lib_engine[] =
 	},
 	{ /* 2 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_killnode,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
 	},
 	{ /* 3 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_tryshutdown,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
 	},
 	{ /* 4 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_replytoshutdown,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
 	},
 	{ /* 5 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_get_node_addrs,
@@ -197,7 +197,7 @@ static struct corosync_lib_handler cfg_lib_engine[] =
 	},
 	{ /* 7 */
 		.lib_handler_fn		= message_handler_req_lib_cfg_reload_config,
-		.flow_control		= CS_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= CS_LIB_FLOW_CONTROL_REQUIRED
 	}
 };