linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Brian D. Behlendorf" <behlendorf1@llnl.gov>
Cc: linux-ext4@vger.kernel.org, adilger@clusterfs.com, wartens2@llnl.gov
Subject: Re: e2fsprogs coverity patch <cid-01.diff>
Date: Sun, 18 Mar 2007 09:55:23 -0400	[thread overview]
Message-ID: <20070318135523.GA14519@thunk.org> (raw)
In-Reply-To: <200702100208.l1A28GC2005813@igsi.llnl.gov>

On Fri, Feb 09, 2007 at 06:08:16PM -0800, Brian D. Behlendorf wrote:
> Found 2 of the three places where a return code for ext2fs_write_inode() was
> not being checked.
> 
> 
> Index: e2fsprogs+chaos/resize/resize2fs.c
> ===================================================================
> --- e2fsprogs+chaos.orig/resize/resize2fs.c
> +++ e2fsprogs+chaos/resize/resize2fs.c
> @@ -1303,7 +1303,9 @@ static int check_and_change_inodes(ext2_
>  	retval = ext2fs_read_inode(is->rfs->old_fs, dir, &inode);
>  	if (retval == 0) {
>  		inode.i_mtime = inode.i_ctime = time(0);
> -		ext2fs_write_inode(is->rfs->old_fs, dir, &inode);
> +		retval = ext2fs_write_inode(is->rfs->old_fs, dir, &inode);
> +		if (retval)
> +			return DIRENT_ERROR;
>  	}

The new lines should read:

	is->err = ext2fs_write_inode(...)
	if (is->err)
		return DIRENT_ABORT

I'll fix up the patch before committing.

> Index: e2fsprogs+chaos/e2fsck/emptydir.c
> ===================================================================
> --- e2fsprogs+chaos.orig/e2fsck/emptydir.c


n.b. emptydir.c is the ultimate in dead code.  It was some code that I
never finished, and it's not linked into e2fsck at all (emptydir.c/o
is not mentioned in the Makefile at all :-).

						- Ted

  parent reply	other threads:[~2007-03-18 13:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-10  2:08 e2fsprogs coverity patch <cid-1.diff> Brian D. Behlendorf
2007-02-10 13:55 ` Theodore Tso
2007-02-12 18:23   ` Brian Behlendorf
2007-03-18 13:40 ` Theodore Tso
2007-03-18 17:32   ` Andreas Dilger
2007-03-18 13:55 ` Theodore Tso [this message]
2007-03-29 18:07 ` e2fsprogs coverity patch Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070318135523.GA14519@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@clusterfs.com \
    --cc=behlendorf1@llnl.gov \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wartens2@llnl.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).