usnic: ensure to clean up nicely in case of low resources
If there are not enough resources (e.g., low VFs), we can end up calling finalize_one_channel() on the same channel multiple times. So ensure to NULL out fields that we have freed already so that we do not try to free them a second time. Fixes CSCus26648.
Этот коммит содержится в:
родитель
8807ae2497
Коммит
e4e5e7dbc0
@ -1942,6 +1942,7 @@ static void finalize_one_channel(opal_btl_usnic_module_t *module,
|
|||||||
|
|
||||||
if (NULL != channel->info) {
|
if (NULL != channel->info) {
|
||||||
fi_freeinfo(channel->info);
|
fi_freeinfo(channel->info);
|
||||||
|
channel->info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* gets set right after constructor called, lets us know recv_segs
|
/* gets set right after constructor called, lets us know recv_segs
|
||||||
@ -2326,6 +2327,11 @@ static int init_channels(opal_btl_usnic_module_t *module)
|
|||||||
struct fi_av_attr av_attr;
|
struct fi_av_attr av_attr;
|
||||||
struct fi_eq_attr eq_attr;
|
struct fi_eq_attr eq_attr;
|
||||||
|
|
||||||
|
memset(&module->mod_channels[0], 0,
|
||||||
|
sizeof(module->mod_channels[0]));
|
||||||
|
memset(&module->mod_channels[1], 0,
|
||||||
|
sizeof(module->mod_channels[1]));
|
||||||
|
|
||||||
memset(&av_attr, 0, sizeof(av_attr));
|
memset(&av_attr, 0, sizeof(av_attr));
|
||||||
av_attr.type = FI_AV_MAP;
|
av_attr.type = FI_AV_MAP;
|
||||||
av_attr.flags = FI_EVENT;
|
av_attr.flags = FI_EVENT;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user