Whamcloud - gitweb
LU-1600 lnet: another race in lnet_nid2peer_locked
[fs/lustre-release.git] / lnet / lnet / router.c
index 7c2a453..a755db6 100644 (file)
@@ -1572,6 +1572,11 @@ lnet_notify(lnet_ni_t *ni, lnet_nid_t nid, int alive, cfs_time_t when)
 
        lnet_net_lock(cpt);
 
+       if (the_lnet.ln_shutdown) {
+               lnet_net_unlock(cpt);
+               return -ESHUTDOWN;
+       }
+
        lp = lnet_find_peer_locked(the_lnet.ln_peer_tables[cpt], nid);
        if (lp == NULL) {
                /* nid not found */