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

dereferencing ERR PTR in kiblnd_alloc_freg_pool

    XMLWordPrintable

Details

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

    Description

      Recently landed FMR patch introduced this problem:

                      frd->frd_frpl = ib_alloc_fast_reg_page_list(fpo->fpo_hdev->ibh_ibdev,
                                                                  LNET_MAX_PAYLOAD/PAGE_SIZE);
                      if (IS_ERR(frd->frd_frpl)) {
                              rc = PTR_ERR(frd->frd_frpl);
                              CERROR("Failed to allocate ib_fast_reg_page_list: %d\n",
                                      rc);
                              goto out_middle;
                      }
      
      ...
      out_middle:
              if (frd->frd_mr)
                      ib_dereg_mr(frd->frd_mr);
              if (frd->frd_frpl)
                      ib_free_fast_reg_page_list(frd->frd_frpl);
      

      We should be either assigning the frd_frpl NULL or expand the check at teh end, I guess.

      Attachments

        Activity

          People

            dmiter Dmitry Eremin (Inactive)
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: