linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext3: Fix not initialized hash info in ext3_dx_find_entry()
@ 2007-08-30 14:42 Wang Chen
  2007-08-30 15:29 ` Theodore Tso
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Chen @ 2007-08-30 14:42 UTC (permalink / raw)
  To: linux-ext4; +Cc: Wang Chen

- In fs/ext3/namei.c, Variable "hinfo" may be referenced before it has
been set with a value.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---

diff -Nurp linux-2.6.22.4.org/fs/ext3/namei.c linux-2.6.22.4/fs/ext3/namei.c
--- linux-2.6.22.4.org/fs/ext3/namei.c  2007-08-22 15:33:40.000000000 +0800
+++ linux-2.6.22.4/fs/ext3/namei.c      2007-08-28 17:47:44.000000000 +0800
@@ -952,6 +952,12 @@ static struct buffer_head * ext3_dx_find
                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 */
+               if (dentry){
+                       ext3fs_dirhash(dentry->d_name.name, dentry->d_name.len,
+                                      &hinfo);
+               } else {
+                       return NULL;
+               }
        }
        hash = hinfo.hash;
        do {

--
Wang Chen 

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

end of thread, other threads:[~2007-08-31  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 14:42 [PATCH] ext3: Fix not initialized hash info in ext3_dx_find_entry() Wang Chen
2007-08-30 15:29 ` Theodore Tso
2007-08-31  1:34   ` FNST-Wang Chen

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).