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

ext2fs_open2() missing goto

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Minor Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      In e2fsprogs ext2fs_open2() there is a missing goto cleanup after retval = EXT2_ET_SB_CSUM_INVALID. And probably after retval = EXT2_ET_UNKNOWN_CSUM;.

              if (!(fs->flags & EXT2_FLAG_IGNORE_CSUM_ERRORS)) {
                      retval = 0;
                      if (!ext2fs_verify_csum_type(fs, fs->super))
                              retval = EXT2_ET_UNKNOWN_CSUM;
                      if (!ext2fs_superblock_csum_verify(fs, fs->super)) {
                              if (csum_retries++ < 3)
                                      goto retry;
                              retval = EXT2_ET_SB_CSUM_INVALID;
                      }
              }
      

      Also I find it strange that we check the super block magic after verifying the checksum.

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: