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

Ping buffer reference leaks in lnet_peer_data_present()

    XMLWordPrintable

Details

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

    Description

      There are some additional places where ping buffer reference will leak in lnet_peer_data_present(). These are error paths so they should be rare.

      static int lnet_peer_data_present(struct lnet_peer *lp)
      __must_hold(&lp->lp_lock)
      {
      ...
              if (list_empty(&lp->lp_peer_list))
                      goto out; <<< Ref leak
      ...
              if (nid_is_lo0(&lp->lp_primary_nid)) {
                      rc = lnet_peer_set_primary_nid(lp, nid, flags);
                      if (!rc) <<< ref leak if rc is non-zero
                              rc = lnet_peer_merge_data(lp, pbuf);
      ...
                      if (!lpni || lp == lpni->lpni_peer_net->lpn_peer) {
                              rc = lnet_peer_set_primary_nid(lp, nid, flags);
                              if (rc) { 
                                      CERROR("Primary NID error %s versus %s: %d\n",
                                             libcfs_nidstr(&lp->lp_primary_nid),
                                             libcfs_nid2str(nid), rc);   <<< ref leak
                              } else {
                                      rc = lnet_peer_merge_data(lp, pbuf);
                              }
      ...
      

      Attachments

        Activity

          People

            hornc Chris Horn
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: