@@ -3297,11 +3297,15 @@ u32 lnet_get_dlc_seq_locked(void)
if (rc < 0)
return rc;
+ mutex_lock(&the_lnet.ln_api_mutex);
lp = lnet_find_peer(ping->ping_id.nid);
if (lp) {
ping->ping_id.nid = lp->lp_primary_nid;
ping->mr_info = lnet_peer_is_multi_rail(lp);
+ lnet_peer_decref_locked(lp);
}
+ mutex_unlock(&the_lnet.ln_api_mutex);
+
ping->ping_count = rc;
return 0;
}
@@ -3315,11 +3319,15 @@ u32 lnet_get_dlc_seq_locked(void)
discover->ping_count);
if (rc < 0)
return rc;
+
+ mutex_lock(&the_lnet.ln_api_mutex);
lp = lnet_find_peer(discover->ping_id.nid);
if (lp) {
discover->ping_id.nid = lp->lp_primary_nid;
discover->mr_info = lnet_peer_is_multi_rail(lp);
+ lnet_peer_decref_locked(lp);
}
+ mutex_unlock(&the_lnet.ln_api_mutex);
discover->ping_count = rc;
return 0;