linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Carlos Maiolino <cmaiolino@redhat.com>, linux-ext4@vger.kernel.org
Subject: Re: [v2] ext4: fix possible non-initialized variable
Date: Mon, 17 Sep 2012 11:37:01 -0400	[thread overview]
Message-ID: <20120917153701.GA5510@thunk.org> (raw)
In-Reply-To: <50574226.3020908@redhat.com>

On Mon, Sep 17, 2012 at 10:30:46AM -0500, Eric Sandeen wrote:
> fwiw, the uninit variable came about as part of
> 2ed886852adfcb070bf350e66a0da0d98b2f3ab5; before that we happily
> returned 0 for an unmapped block; see below.  So unless something
> else has changed since then, Carlos' patch shouldn't be doing any
> harm, at least.  An audit may be in order but anyone
> misunderstanding a NULL/0 return has probably been that way for a
> while.

Hmm, good point.

This is an audit that needs to happen for ext3 and ext4 as well, BTW
--- the callers of ext3_getblk() don't do the right thing when
ext3_getblk returns NULL and sets *errp to zero.

Fortunately it's rare that we have directories with holes, but there
are definitely bugs in terms of undefined behavior in the case of
directories with holes that we should look at and fix.

	    	       	       	      	      - Ted


  reply	other threads:[~2012-09-17 15:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 21:55 [PATCH v2] ext4: fix possible non-initialized variable Carlos Maiolino
2012-09-15 18:30 ` [v2] " Theodore Ts'o
2012-09-17 14:55   ` Eric Sandeen
2012-09-17 15:30     ` Eric Sandeen
2012-09-17 15:37       ` Theodore Ts'o [this message]
2012-09-17 18:26         ` Carlos Maiolino
2012-09-18  3:59           ` Theodore Ts'o
2012-09-18 12:51             ` Carlos Maiolino
2012-09-19 20:10               ` Carlos Maiolino
2012-09-19 20:41                 ` Theodore Ts'o
2012-09-20  2:59                   ` Eric Sandeen
2012-09-21 19:14                     ` Carlos Maiolino
2012-09-22  0:52                       ` Theodore Ts'o

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=20120917153701.GA5510@thunk.org \
    --to=tytso@mit.edu \
    --cc=cmaiolino@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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).