Reviewed-by: Steven Dake <[email protected]> On 05/24/2011 06:36 AM, Jiaju Zhang wrote: > This patch fixes the rolling upgrade issue from openais whitetank to > corosync 1.3. The problem is the length of the array > cpg_exec_service[]/cpg_exec_engine[] is different in the two version. > > In openais whitetank: > > static struct openais_exec_handler cpg_exec_service[] = > { > { /* 0 */ > .exec_handler_fn = > message_handler_req_exec_cpg_procjoin, > .exec_endian_convert_fn = exec_cpg_procjoin_endian_convert > }, > { /* 1 */ > .exec_handler_fn = > message_handler_req_exec_cpg_procleave, > .exec_endian_convert_fn = exec_cpg_procjoin_endian_convert > }, > { /* 2 */ > .exec_handler_fn = > message_handler_req_exec_cpg_joinlist, > .exec_endian_convert_fn = exec_cpg_joinlist_endian_convert > }, > { /* 3 */ > .exec_handler_fn = message_handler_req_exec_cpg_mcast, > .exec_endian_convert_fn = exec_cpg_mcast_endian_convert > }, > { /* 4 */ > .exec_handler_fn = > message_handler_req_exec_cpg_downlist, > .exec_endian_convert_fn = exec_cpg_downlist_endian_convert > }, > }; > > In corosync: > > static struct corosync_exec_handler cpg_exec_engine[] = > { > { /* 0 */ > .exec_handler_fn = > message_handler_req_exec_cpg_procjoin, > .exec_endian_convert_fn = exec_cpg_procjoin_endian_convert > }, > { /* 1 */ > .exec_handler_fn = > message_handler_req_exec_cpg_procleave, > .exec_endian_convert_fn = exec_cpg_procjoin_endian_convert > }, > { /* 2 */ > .exec_handler_fn = > message_handler_req_exec_cpg_joinlist, > .exec_endian_convert_fn = exec_cpg_joinlist_endian_convert > }, > { /* 3 */ > .exec_handler_fn = message_handler_req_exec_cpg_mcast, > .exec_endian_convert_fn = exec_cpg_mcast_endian_convert > }, > { /* 4 */ > .exec_handler_fn = > message_handler_req_exec_cpg_downlist_old, > .exec_endian_convert_fn = exec_cpg_downlist_endian_convert_old > }, > { /* 5 */ > .exec_handler_fn = > message_handler_req_exec_cpg_downlist, > .exec_endian_convert_fn = exec_cpg_downlist_endian_convert > }, > }; > > > So the "old" node (with openais whitetank) will get a NULL pointer > when it recevies the message from the "new" node (with corosync 1.3) > and then coredump. > > Signed-off-by: Jiaju Zhang <[email protected]> > --- > Index: openais/exec/main.c > =================================================================== > --- openais.orig/exec/main.c > +++ openais/exec/main.c > @@ -403,8 +403,9 @@ static void deliver_fn ( > (header); > } > > - ais_service[service]->exec_service[fn_id].exec_handler_fn > - (header, nodeid); > + if (ais_service[service]->exec_service[fn_id].exec_handler_fn) > + ais_service[service]->exec_service[fn_id].exec_handler_fn > + (header, nodeid); > > serialize_mutex_unlock (); > } > _______________________________________________ > Openais mailing list > [email protected] > https://lists.linux-foundation.org/mailman/listinfo/openais
_______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
