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

ext2fs_open2() missing goto

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: