Ack.
Code review only.

Thanks,
Ramesh.

On 5/15/2015 1:15 PM, [email protected] wrote:
>   osaf/services/saf/cpsv/cpnd/cpnd_proc.c |  1 -
>   osaf/services/saf/cpsv/cpnd/cpnd_tmr.c  |  5 +++++
>   2 files changed, 5 insertions(+), 1 deletions(-)
>
>
> 1) if ckpt application registered for  saCkptCheckpointTrackCallback
> the cpnd_proc_ckpt_arrival_info_ntfy() will be triggered for that cpa from 
> cpnd,
> as if ckpt_data->data & ckpt_data->readSize are not relevant to CPA,
> so readSize was assigned to zero and data is set to NULL , as an impact  the
> ckpt_data->data was not visible in cpnd_evt_destroy()
> function which frees the memory ,the ckpt_data->data memory not visible  and 
> not freed,
> that is  causing memory leak. As the readSize =  Zero good enough data for 
> cap to determine their no data,
> so  NULL  assignment to ckpt_data->data is removed.
>
> 2)  If CPA accidentally/intentionally  passes  a negative  value ,
> as an impact the section leap times expiration time  is being configured with 
> huge value
> and timers are NOT being kept in free pool even after sorceress deleted,
> so application RSS memory continuously getting increased  and being 
> interpreted as memleak.
> No protection is added for timer start , but this will not prevent 
> checkpoint/section creation
> the timer being configured as SA_TIME_END.
>
> diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_proc.c 
> b/osaf/services/saf/cpsv/cpnd/cpnd_proc.c
> --- a/osaf/services/saf/cpsv/cpnd/cpnd_proc.c
> +++ b/osaf/services/saf/cpsv/cpnd/cpnd_proc.c
> @@ -269,7 +269,6 @@ uint32_t cpnd_proc_ckpt_arrival_info_ntf
>                       send_evt.info.cpa.info.arr_msg.mdest = 
> in_evt->agent_mdest;
>                       send_evt.info.cpa.info.arr_msg.num_of_elmts = 
> in_evt->num_of_elmts;
>                       send_evt.info.cpa.info.arr_msg.ckpt_data = in_evt->data;
> -                     send_evt.info.cpa.info.arr_msg.ckpt_data->data = NULL;
>                       send_evt.info.cpa.info.arr_msg.ckpt_data->readSize = 0;
>   
>                       rc = cpnd_mds_msg_send(cb, NCSMDS_SVC_ID_CPA, 
> ptr_cl_node->cnode->agent_mds_dest, &send_evt);
> diff --git a/osaf/services/saf/cpsv/cpnd/cpnd_tmr.c 
> b/osaf/services/saf/cpsv/cpnd/cpnd_tmr.c
> --- a/osaf/services/saf/cpsv/cpnd/cpnd_tmr.c
> +++ b/osaf/services/saf/cpsv/cpnd/cpnd_tmr.c
> @@ -120,6 +120,11 @@ done:
>    
> *****************************************************************************/
>   uint32_t cpnd_tmr_start(CPND_TMR *tmr, SaTimeT duration)
>   {
> +     if (duration < 0) {
> +             LOG_ER("cpnd: invalid expirationTime:%llu timer start failed 
> for ckpt_id:%llx timertype:%d",
> +                             duration, tmr->ckpt_id, tmr->type);
> +             return NCSCC_RC_INV_VAL;
> +     }
>       if (tmr->tmr_id == TMR_T_NULL) {
>               m_NCS_TMR_CREATE(tmr->tmr_id, duration, cpnd_timer_expiry, 
> (void *)tmr);
>       }


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to