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

lmv_intent_lookup() leaks lock if lmv_revalidate_slaves() fails

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.7.0
    • Lustre 2.6.0, Lustre 2.7.0
    • 3
    • 15126

    Description

      In lmv_intent_lookup() if md_intent_lock() succeeds but lmv_revalidate_slaves() fails then the lock referenced by it->d.lustre.it_lock_handle is leaked.

              rc = md_intent_lock(tgt->ltd_exp, op_data, it, reqp, cb_blocking,
                                  extra_lock_flags);
              if (rc < 0)
                      RETURN(rc);
      
              if (*reqp == NULL) {
                      /* If RPC happens, lsm information will be revalidated                    
                       * during update_inode process (see ll_update_lsm_md) */
                      if (op_data->op_mea2 != NULL) {
                              rc = lmv_revalidate_slaves(exp, NULL, op_data->op_mea2,
                                                         cb_blocking,
                                                         extra_lock_flags);
                              if (rc != 0)
                                      RETURN(rc);
                      }
                      RETURN(rc);
              }
      

      This was found through manual code audit.

      Attachments

        Issue Links

          Activity

            [LU-5431] lmv_intent_lookup() leaks lock if lmv_revalidate_slaves() fails

            Patch landed to Master.

            jlevi Jodi Levi (Inactive) added a comment - Patch landed to Master.
            jhammond John Hammond added a comment -

            A bit of instrumentation shows that this is easy to hit running racer.

            jhammond John Hammond added a comment - A bit of instrumentation shows that this is easy to hit running racer.
            jhammond John Hammond added a comment - Please see http://review.whamcloud.com/11319 .

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: