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

Unchecked usage of potential ERR_PTR result in lmv_hsm_req_count and lmv_hsm_req_build

Details

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

    Description

      smatch highlighted that lmv_hsm_req_count and lmv_hsm_req_build have this sort of code:

              for (i = 0; i < hur->hur_request.hr_itemcount; i++) {
                      curr_tgt = lmv_find_target(lmv, &hur->hur_user_item[i].hui_fid);
                      if (obd_uuid_equals(&curr_tgt->ltd_uuid, &tgt_mds->ltd_uuid))
                              nr++;
              }
      

      lmv_find_target can return an error that we definitely need to check for there.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: