Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • Lustre 2.7.0
    • 3
    • 16418

    Description

      Pointer 'matched' returned from call to function 'ldlm_handle2lock' at line 2312 may be NULL and will be dereferenced at line 2318. Also there are 2 similar errors on line(s) 2327, 2331.

      TRACEBACK:

      • osc_request.c:2312: 'matched' is assigned the return value from function 'ldlm_handle2lock'.
        • lustre_dlm.h:1254: '_ldlm_handle2lock(h, 0)' is assigned the return value from function '_ldlm_handle2lock'.
          • ldlm_lock.c:606: '__ldlm_handle2lock' explicitly returns a NULL value.
        • lustre_dlm.h:1254: '__ldlm_handle2lock(h, 0)' is returned by 'ldlm_handle2lock'.
      • osc_request.c:2318: 'matched' is dereferenced by passing argument 1 to function 'ldlm_lock_put'.
        • ldlm_lock.c:201: 'lock' is passed to function 'ldlm_lock_put'.
        • ldlm_lock.c:205: 'lock' is explicitly dereferenced.

      Attachments

        Issue Links

          Activity

            [LU-5869] New static analysis issues in osc
            pjones Peter Jones added a comment -

            As per discussion on the triage call this hypothetical issue is not an actual bug

            pjones Peter Jones added a comment - As per discussion on the triage call this hypothetical issue is not an actual bug
            green Oleg Drokin added a comment -

            So writing a patch that trades one crash for another is bad practice.
            We really should try and recover from this situation instead!

            green Oleg Drokin added a comment - So writing a patch that trades one crash for another is bad practice. We really should try and recover from this situation instead!

            Bobi Jam (bobijam@gmail.com) uploaded a new patch: http://review.whamcloud.com/13042
            Subject: LU-5869 osc: handle ldlm_handle2lock() static analysis issue
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 963c63b93325f19c053c285a38091cbda1874d89

            gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@gmail.com) uploaded a new patch: http://review.whamcloud.com/13042 Subject: LU-5869 osc: handle ldlm_handle2lock() static analysis issue Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 963c63b93325f19c053c285a38091cbda1874d89

            BobiJam,
            Can you take a look at this one?
            Thank you!

            jlevi Jodi Levi (Inactive) added a comment - BobiJam, Can you take a look at this one? Thank you!

            People

              bobijam Zhenyu Xu
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: