Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-9919

unsafe peer access in lnet_select_pathway()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Looking at the changes to lnet_select_pathway() in https://review.whamcloud.com/#/c/25789/24/lnet/lnet/lib-move.c the accesses to peer appear to be unsafe. In the CDEBUG() peer may be invalid:

                      lnet_peer_ni_decref_locked(lpni);
                      lnet_net_unlock(cpt);
      
                      CDEBUG(D_NET, "%s pending discovery\n",
                             libcfs_nid2str(peer->lp_primary_nid));
      
                      return LNET_DC_WAIT;
      

      And similarly after the lpni has been released:

              }
              lnet_peer_ni_decref_locked(lpni);
      
              /* If peer is not healthy then can not send anything to it */
              if (!lnet_is_peer_healthy_locked(peer)) {
                      lnet_net_unlock(cpt);
                      return -EHOSTUNREACH;
              }
      

      Attachments

        Activity

          People

            ashehata Amir Shehata (Inactive)
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: