linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Borisov <ext-roman.borisov@nokia.com>
To: linux-ext4@vger.kernel.org
Cc: Roman Borisov <ext-roman.borisov@nokia.com>
Subject: ext3: ext4: Using uninitialized value
Date: Wed, 13 Oct 2010 18:40:22 +0400	[thread overview]
Message-ID: <4CB5C4D6.3020201@nokia.com> (raw)

Hello,

Could you clarify is there a bug in fs/ext4/namei.c,
ext4_dx_find_entry() and fs/ext4/namei.c, ext3_dx_find_entry()?

<code>
static struct buffer_head * ext3_dx_find_entry(struct inode *dir,
...
struct dx_hash_info hinfo;
...
if (namelen > 2 || name[0] != '.'|| (namelen == 2 && name[1] != '.')) {
if (!(frame = dx_probe(entry, dir, &hinfo, frames, err)))
return NULL;
} else {
frame = frames;
frame->bh = NULL; /* for dx_release() */
frame->at = (struct dx_entry *)frames; /* hack for zero entry*/
dx_set_block(frame->at, 0); /* dx_root block is 0 */
}
hash = hinfo.hash;
...
retval = ext3_htree_next_block(dir, hash, frame,
...
</code>

In the code above: hinfo.hash is not initialized in "else" case.
Should it be initialized as NULL?
Or maybe implementation doesn't assume to call ext3_htree_next_block()
in such case?

Thanks,
Roman


             reply	other threads:[~2010-10-13 14:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 14:40 Roman Borisov [this message]
2010-10-13 16:13 ` ext3: ext4: Using uninitialized value Eric Sandeen
2010-10-13 18:56   ` Andreas Dilger
2010-10-14 10:10     ` Roman Borisov
2010-10-14 13:42       ` Eric Sandeen
2010-10-16 23:35   ` Ted Ts'o
2010-10-16 23:36     ` [PATCH 1/2] ext3: Avoid uninitialized memory references with a corrupted htree directory Theodore Ts'o
2010-10-18 10:05       ` Jan Kara
2010-10-19  7:12         ` Andreas Dilger
2010-10-16 23:37     ` [PATCH 2/2] ext3: Use search_dirblock() in ext3_dx_find_entry() Theodore Ts'o
2010-10-16 23:37     ` [PATCH 1/2] ext4: Avoid uninitialized memory references in ext3_htree_next_block() Theodore Ts'o
2010-10-18  4:27       ` Andreas Dilger
2010-10-16 23:37     ` [PATCH 2/2] ext4: Use search_dirblock() in ext4_dx_find_entry() 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=4CB5C4D6.3020201@nokia.com \
    --to=ext-roman.borisov@nokia.com \
    --cc=linux-ext4@vger.kernel.org \
    /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).