Hi Thuan, Ack. Regards, Thanh -----Original Message----- From: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au> Sent: Wednesday, 19 August 2020 5:39 PM To: Thuan Tran <thuan.t...@dektech.com.au>; Minh Hon Chau <minh.c...@dektech.com.au>; Thanh Nguyen <thanh.ngu...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] mbc: fix agent crash inside ncs_mbcsv_null_func() [#3214]
Hi Thuan, Ack. No more comment from me. B.R/Thang -----Original Message----- From: Thuan Tran <thuan.t...@dektech.com.au> Sent: Tuesday, August 18, 2020 10:29 AM To: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au>; Minh Hon Chau <minh.c...@dektech.com.au>; Thanh Nguyen <thanh.ngu...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] mbc: fix agent crash inside ncs_mbcsv_null_func() [#3214] Hi Thang, NULL is already checked inside m_MMGR_FREE_BUFR_LIST() Best Regards, ThuanTr -----Original Message----- From: Thang Duc Nguyen <thang.d.ngu...@dektech.com.au> Sent: Tuesday, August 18, 2020 8:40 AM To: Thuan Tran <thuan.t...@dektech.com.au>; Minh Hon Chau <minh.c...@dektech.com.au>; Thanh Nguyen <thanh.ngu...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] mbc: fix agent crash inside ncs_mbcsv_null_func() [#3214] Hi Thuan, I think in ncs_mbcsv_null_func() just add a check before freeing. e.g, if (evt->info.peer_msg.info.client_msg.uba.ub != NULL) m_MMGR_FREE_BUFR_LIST( evt->info.peer_msg.info.client_msg.uba.ub); B.R/Thang -----Original Message----- From: Thuan Tran <thuan.t...@dektech.com.au> Sent: Friday, August 14, 2020 1:33 PM To: Minh Hon Chau <minh.c...@dektech.com.au>; Thang Duc Nguyen <thang.d.ngu...@dektech.com.au>; Thanh Nguyen <thanh.ngu...@dektech.com.au> Cc: opensaf-devel@lists.sourceforge.net; Thuan Tran <thuan.t...@dektech.com.au> Subject: [PATCH 1/1] mbc: fix agent crash inside ncs_mbcsv_null_func() [#3214] --- src/mbc/mbcsv_peer.c | 8 +++----- src/mbc/mbcsv_util.c | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/mbc/mbcsv_peer.c b/src/mbc/mbcsv_peer.c index 1a9eeb125..e81352105 100644 --- a/src/mbc/mbcsv_peer.c +++ b/src/mbc/mbcsv_peer.c @@ -457,7 +457,6 @@ FSM. * Then depending on its current role it will start FSM. void mbcsv_clear_multiple_active_state(CKPT_INST *ckpt) { PEER_INST *peer; - MBCSV_EVT rcvd_evt; TRACE_ENTER(); /* @@ -470,8 +469,7 @@ void mbcsv_clear_multiple_active_state(CKPT_INST *ckpt) peer = ckpt->peer_list; TRACE("multiple ACTIVE peers"); - m_NCS_MBCSV_FSM_DISPATCH(peer, NCSMBCSV_EVENT_MULTIPLE_ACTIVE, - &rcvd_evt); + m_NCS_MBCSV_FSM_DISPATCH(peer, NCSMBCSV_EVENT_MULTIPLE_ACTIVE, NULL); TRACE_LEAVE(); return; @@ -491,12 +489,12 @@ void mbcsv_clear_multiple_active_state(CKPT_INST *ckpt) m_NCS_MBCSV_FSM_DISPATCH( peer, NCSMBCSV_EVENT_STATE_TO_KEEP_STBY_SYNC, - &rcvd_evt); + NULL); else m_NCS_MBCSV_FSM_DISPATCH( peer, NCSMBCSV_EVENT_STATE_TO_WAIT_FOR_CW_SYNC, - &rcvd_evt); + NULL); } peer = peer->next; diff --git a/src/mbc/mbcsv_util.c b/src/mbc/mbcsv_util.c index dafa268ba..9ce79243f 100644 --- a/src/mbc/mbcsv_util.c +++ b/src/mbc/mbcsv_util.c @@ -409,8 +409,7 @@ uint32_t mbcsv_send_ckpt_data_to_all_peers(NCS_MBCSV_SEND_CKPT *msg_to_send, continue; } TRACE("dispatching FSM for NCSMBCSV_SEND_ASYNC_UPDATE"); - m_NCS_MBCSV_FSM_DISPATCH(peer_ptr, NCSMBCSV_SEND_ASYNC_UPDATE, - &evt_msg); + m_NCS_MBCSV_FSM_DISPATCH(peer_ptr, NCSMBCSV_SEND_ASYNC_UPDATE, NULL); if (false == peer_ptr->okay_to_async_updt) { peer_ptr->ckpt_msg_sent = true; @@ -471,7 +470,7 @@ uint32_t mbcsv_send_ckpt_data_to_all_peers(NCS_MBCSV_SEND_CKPT *msg_to_send, while (NULL != tmp_ptr) { TRACE("dispatching FSM for NCSMBCSV_SEND_ASYNC_UPDATE"); m_NCS_MBCSV_FSM_DISPATCH( - tmp_ptr, NCSMBCSV_SEND_ASYNC_UPDATE, &evt_msg); + tmp_ptr, NCSMBCSV_SEND_ASYNC_UPDATE, NULL); if (false == tmp_ptr->okay_to_async_updt) { tmp_ptr->ckpt_msg_sent = true; -- 2.17.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel