[dm-devel] [PATCH 11/14] mpathpersist: check whether malloc paramp->trnptid_list, fails in handle_args func

lixiaokeng lixiaokeng at huawei.com
Mon Sep 7 12:26:56 UTC 2020


>>
>> -		paramp= malloc(sizeof(struct prout_param_descriptor) + (sizeof(struct transportid *)*(MPATH_MX_TIDS )));
>> -
>> -		memset(paramp, 0, sizeof(struct prout_param_descriptor) + (sizeof(struct transportid *)*(MPATH_MX_TIDS)));
> 
> When looking at your patch, I noticed that this function has both
> num_transport and num_transportids, but only num_transport is used,
> while num_transportids is reported back to the user.  I realize that
> this is only tangentially related to your patch, but if you could
> combine these two varaiables, that would be helpful.
> 

Hi Ben:
  Thanks for you great advice. I will make patch v2 following your
advice.

-Lixiaokeng




More information about the dm-devel mailing list