linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH v2] ext4: add checks of block references for non-extent inodes
Date: Fri, 27 Mar 2009 21:10:54 -0400	[thread overview]
Message-ID: <20090328011054.GA2155@mit.edu> (raw)
In-Reply-To: <49C3A51C.1030201@ph.tum.de>

On Fri, Mar 20, 2009 at 03:15:56PM +0100, Thiemo Nagel wrote:
> Dear Ted,
>
> I'm sending an improved patch as I've come to the conclusion that the  
> previous patch is too lenient in two ways:
> * off-by-one in the check of the upper block limit
> * it shouldn't stop when encountering a reference to block number zero  
> because, if I'm not mistaken, references behind it still might be  
> accessed in sparse files / when seeking behind the end of a file.

Note: this patch has a rather fatal flaw; it doens't check to make
sure that file is a regular file or directory first.  If you have a
fast symlink, ext4_iget() will blow up since it's a non-extent file,
but the i_blocks[] will contain an ASCII string.

I'll fix up your patch to deal add the appropriate checking.

          	    	       	       	   - Ted

  parent reply	other threads:[~2009-03-28  1:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12 17:17 [PATCH] ext4: add checks of block references for non-extent inodes Thiemo Nagel
2009-03-12 17:20 ` [PATCH] ext4: check block references only when read from disk Thiemo Nagel
2009-03-12 17:22   ` Thiemo Nagel
2009-03-20 14:15 ` [PATCH v2] ext4: add checks of block references for non-extent inodes Thiemo Nagel
2009-03-27 21:05   ` Theodore Tso
2009-03-28  1:10   ` Theodore Tso [this message]
2009-03-30 10:43   ` Aneesh Kumar K.V
2009-03-31  8:41   ` Thiemo Nagel
2009-03-31 12:37     ` Theodore Tso
2009-03-31 12:50       ` Thiemo Nagel

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=20090328011054.GA2155@mit.edu \
    --to=tytso@mit.edu \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=thiemo.nagel@ph.tum.de \
    /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).