All of lore.kernel.org
 help / color / mirror / Atom feed
* ext3: ext4: Using uninitialized value
@ 2010-10-13 14:40 Roman Borisov
  2010-10-13 16:13 ` Eric Sandeen
  0 siblings, 1 reply; 13+ messages in thread
From: Roman Borisov @ 2010-10-13 14:40 UTC (permalink / raw)
  To: linux-ext4; +Cc: Roman Borisov

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-10-19  7:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 14:40 ext3: ext4: Using uninitialized value Roman Borisov
2010-10-13 16:13 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.