On Thu, 2020-09-10 at 18:51 +0800, lixiaokeng wrote: > In assemble_map func, f = STRDUP(mp->features) is just used > for APPEND(). We can directly pass mp->features to APPEND(). > The mpp->features, hwhandler and selector got form strdup > should be check after select* function. > > Signed-off-by: Zhiqiang Liu <liuzhiqiang26@xxxxxxxxxx> > Signed-off-by: Lixiaokeng <lixiaokeng@xxxxxxxxxx> > --- > libmultipath/configure.c | 5 +++++ > libmultipath/dmparser.c | 11 ++++------- > 2 files changed, 9 insertions(+), 7 deletions(-) > > diff --git a/libmultipath/configure.c b/libmultipath/configure.c > index 5bc65fd3..5d5d9415 100644 > --- a/libmultipath/configure.c > +++ b/libmultipath/configure.c > @@ -355,6 +355,11 @@ int setup_map(struct multipath *mpp, char > *params, int params_size, > select_ghost_delay(conf, mpp); > select_flush_on_last_del(conf, mpp); > > + if (!mpp->features || !mpp->hwhandler || !mpp->selector) { > + condlog(0, "%s: map select failed", mpp->alias); > + return 1; > + } > + > > sysfs_set_scsi_tmo(mpp, conf->checkint); > marginal_pathgroups = conf->marginal_pathgroups; > pthread_cleanup_pop(1); Just saw this: you can't return between pthread_cleanup_push() and pthread_cleanup_pop(). You need to move this block below the pthread_cleanup_pop() statement. So, Nack for this version of the patch. Sorry Martin -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel