Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
3
-
17068
Description
In LNetCtl():
LNET_MUTEX_LOCK(&the_lnet.ln_api_mutex);
rc = lnet_add_route(config->cfg_net,
config->cfg_config_u.cfg_route.rtr_hop,
config->cfg_nid,
config->cfg_config_u.cfg_route.
rtr_priority);
LNET_MUTEX_UNLOCK(&the_lnet.ln_api_mutex);
return (rc != 0) ? rc : lnet_check_routes();
If lnet_check_routes() returns error, it means the route just added was invalid and must be removed, see LNetNIInit(). It's wrong to just return the error to user space:
1. User space would treat the error as a failure to add the route, but the route was indeed added already.
2. Two conflicting routes now live in the routing table.