From: "Wang Chen" <ellre923@gmail.com>
To: "linux-ext4" <linux-ext4@vger.kernel.org>
Cc: "Wang Chen" <wangchen@cn.fujitsu.com>
Subject: [PATCH] ext3: Fix not initialized hash info in ext3_dx_find_entry()
Date: Thu, 30 Aug 2007 22:42:33 +0800 [thread overview]
Message-ID: <00ee01c7eb14$051e3ed0$0201a8c0@pinkpig> (raw)
- 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
next reply other threads:[~2007-08-30 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 14:42 Wang Chen [this message]
2007-08-30 15:29 ` [PATCH] ext3: Fix not initialized hash info in ext3_dx_find_entry() Theodore Tso
2007-08-31 1:34 ` FNST-Wang Chen
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='00ee01c7eb14$051e3ed0$0201a8c0@pinkpig' \
--to=ellre923@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=wangchen@cn.fujitsu.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