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

Suspicious dereference of pointer before NULL check in osd_declare_qid()

Details

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

    Description

      Suspicious dereference of pointer 'oh' before NULL check at line 515

      • An event which alters the program's state, leading to the defect
        osd_quota.c:508: 'oh' is dereferenced.
      • An event which alters the program's state, leading to the defect
        osd_quota.c:515: 'oh' is checked for NULL.
      504		int osd_declare_qid(const struct lu_env *env, struct osd_thandle *oh,
      505				    struct lquota_id_info *qi, struct osd_object *obj,
      506				    bool enforce, int *flags)
      507		{
      508			struct osd_device       *dev = osd_dt_dev(oh->ot_super.th_dev);
      509			struct qsd_instance     *qsd = dev->od_quota_slave;
      510			struct inode		*inode = NULL;
      511			int                      i, rc = 0, crd;
      512			bool                     found = false;
      513			ENTRY;
      514		 
      515			LASSERT(oh != NULL);
      

      Attachments

        Activity

          [LU-7949] Suspicious dereference of pointer before NULL check in osd_declare_qid()
          pjones Peter Jones added a comment -

          Landed for 2.9

          pjones Peter Jones added a comment - Landed for 2.9

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22428/
          Subject: LU-7949 osd: Move assignment below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 34092ff5ae44c997918f970f100b46727c684855

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/22428/ Subject: LU-7949 osd: Move assignment below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: Commit: 34092ff5ae44c997918f970f100b46727c684855

          Arshad Hussain (arshad.hussain@seagate.com) uploaded a new patch: http://review.whamcloud.com/22428
          Subject: LU-7949 osd: Move assignment below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 66bde872b96b4aba4e552f51ac36003126c28204

          gerrit Gerrit Updater added a comment - Arshad Hussain (arshad.hussain@seagate.com) uploaded a new patch: http://review.whamcloud.com/22428 Subject: LU-7949 osd: Move assignment below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 66bde872b96b4aba4e552f51ac36003126c28204

          People

            wc-triage WC Triage
            dmiter Dmitry Eremin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: