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

NULL pointer dereferenced without check in lsi_prepare()

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.7.0
    • None
    • 3
    • 15591

    Description

      Pointer 'lsi->lsi_lmd->lmd_osd_type' checked for NULL at line 1390 will be dereferenced at line 1402.

      	/* Determine osd type */
      	if (lsi->lsi_lmd->lmd_osd_type != NULL) {
      		if (strlen(lsi->lsi_lmd->lmd_osd_type) >=
      		    sizeof(lsi->lsi_osd_type))
      			RETURN(-ENAMETOOLONG);
      
      		strcpy(lsi->lsi_osd_type, lsi->lsi_lmd->lmd_osd_type);
      	} else {
      		strcpy(lsi->lsi_osd_type, LUSTRE_OSD_LDISKFS_NAME);
      	}
      
      	/* XXX: a temp. solution for components using ldiskfs
      	 *      to be removed in one of the subsequent patches */
      	if (!strcmp(lsi->lsi_lmd->lmd_osd_type, "osd-ldiskfs"))
      		strcpy(lsi->lsi_fstype, "ldiskfs");
      	else
      		strcpy(lsi->lsi_fstype, lsi->lsi_lmd->lmd_osd_type);
      

      Attachments

        Activity

          People

            dmiter Dmitry Eremin (Inactive)
            dmiter Dmitry Eremin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: