lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 13 Oct 2013 22:41:26 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Robert Yang <liezhi.yang@...driver.com>
Cc:	linux-ext4@...r.kernel.org, dvhart@...ux.intel.com
Subject: Re: [RFC 01/10] mke2fs.c: add an option: -d root-directory

On Wed, Aug 28, 2013 at 01:25:51PM +0800, Robert Yang wrote:
> @@ -2773,7 +2776,6 @@ no_journal:
>  		       "filesystem accounting information: "));
>  	checkinterval = fs->super->s_checkinterval;
>  	max_mnt_count = fs->super->s_max_mnt_count;
> -	retval = ext2fs_close(fs);
>  	if (retval) {
>  		fprintf(stderr,
>  			_("\nWarning, had trouble writing out superblocks."));

You can't just move the call to ext2fs_close().  You also need to move

	if (!quiet)
		printf(_("Writing superblocks and "
		       "filesystem accounting information: "));

before the call to ext2fs_close() since this is used to print the
message for the progress information that will be emitted by
ext2fs_close(), and you also have to move the error checking:

  	if (retval) {
  		fprintf(stderr,
  			_("\nWarning, had trouble writing out superblocks."));
	...

after the call to ext2fs_close().


This would have been ***painfully*** obvious if you had run the
regression test suite.  ("make -j8 ; make -j8 check"), since the
inconsistent move of ext2fs_close() without the preceeding printf
would cause all of the mke2fs tests (the m_* tests) to fail.

This is why regression test suites are so important.  :-)

     	    	       	    	       - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ