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

Suspicious dereference of pointer before NULL check in llog_cancel_rec()

Details

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

    Description

      Suspicious dereference of pointer 'loghandle' before NULL check at line 218

      • An event which alters the program's state, leading to the defect
        llog.c:202: 'loghandle' is dereferenced.
      • An event which alters the program's state, leading to the defect
        llog.c:218: 'loghandle' is checked for NULL.
      197		int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle,
      198				    int index)
      199		{
      200			struct llog_thread_info *lgi = llog_info(env);
      201			struct dt_device	*dt;
      202			struct llog_log_hdr	*llh = loghandle->lgh_hdr;
      203			struct thandle		*th;
      204			int			 rc;
      205			int rc1;
      206			bool subtract_count = false;
      207		 
      208			ENTRY;
      209		 
      210			CDEBUG(D_RPCTRACE, "Canceling %d in log "DOSTID"\n", index,
      211			       POSTID(&loghandle->lgh_id.lgl_oi));
      212		 
      213			if (index == 0) {...}
      217		 
      218			LASSERT(loghandle != NULL);
      

      Attachments

        Activity

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

          Landed for 2.11

          pjones Peter Jones added a comment - Landed for 2.11

          Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24561/
          Subject: LU-7947 obdclass: Move assignment below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: bed1cbb3db18e01b933f1a799b4f4fd4ff707cfa

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/24561/ Subject: LU-7947 obdclass: Move assignment below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: Commit: bed1cbb3db18e01b933f1a799b4f4fd4ff707cfa

          Arshad Hussain (arshad.hussain@seagate.com) uploaded a new patch: https://review.whamcloud.com/24561
          Subject: LU-7947 obdclass: Move assignment below LASSERT()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: ffade7f23b66b91b95f68b541f9b4ef1d3aa9227

          gerrit Gerrit Updater added a comment - Arshad Hussain (arshad.hussain@seagate.com) uploaded a new patch: https://review.whamcloud.com/24561 Subject: LU-7947 obdclass: Move assignment below LASSERT() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ffade7f23b66b91b95f68b541f9b4ef1d3aa9227

          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: