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

Possibly access of bad pointer in mdt_obd_connect()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      In mdt_obd_connect we have:

              if ((data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) &&
                  !(data->ocd_connect_flags & OBD_CONNECT_LIGHTWEIGHT)) {
                      atomic_inc(&mdt->mdt_mds_mds_conns);
                      mdt_enable_slc(mdt);
              }
              if (!test_bit(MDT_FL_SYNCED, &mdt->mdt_state) && data != NULL &&
      

      So it's either we should drop the data != NULL check or also check it above or do something els.e

      Otherwise it just looks kind of bad and also confuses static code analyzers.

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: