On Sat, 2020-09-19 at 18:28 +0800, lixiaokeng wrote: > In handle_args func, we donot check whether malloc paramp and > each paramp->trnptid_list[j] fails before using them, it may > cause access NULL pointer. > > Here, we add alloc_prout_param_descriptor to allocate and init > paramp, and we add free_prout_param_descriptor to free paramp > and each paramp->trnptid_list[j]. > > We change num_transport to num_transportids to combine them. > > Signed-off-by: Zhiqiang Liu <liuzhiqiang26@xxxxxxxxxx> > Signed-off-by: lixiaokeng <lixiaokeng@xxxxxxxxxx> > --- > mpathpersist/main.c | 64 ++++++++++++++++++++++++++++++++++--------- > -- > 1 file changed, 49 insertions(+), 15 deletions(-) > OK. So your v5 patch wasn't wrong either, as you did set num_transportids twice. I admit I missed that. But it's better now anyway. Actually, I would have preferred if you solved the issue the other way around, by moving the assignment to num_transportids to after the memset() in alloc_prout_param_descriptor(). But it's not worth forcing you into yet another iteration, so: Reviewed-by: Martin Wilck <mwilck@xxxxxxxx> This means the whole series (except 8/14 which had been taken back) is acked now, and I'll push it to the upstream-queue branch. Martin -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel