From: Carlos Maiolino <cmaiolino@redhat.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH 1/2] ext3: fix possible non-initialized variable on htree_dirblock_to_tree()
Date: Mon, 1 Oct 2012 16:50:54 -0300 [thread overview]
Message-ID: <1349121055-8168-2-git-send-email-cmaiolino@redhat.com> (raw)
In-Reply-To: <1349121055-8168-1-git-send-email-cmaiolino@redhat.com>
This is a backport of ext4 commit 90b0a9732 which fixes a possible
non-initialized variable on htree_dirblock_to_tree().
Ext3 has the same non initialized variable, but, in any case it will be
initialized by ext3_get_blocks_handle(), which will avoid the bug to be
triggered, but, the non-initialized variable by htree_dirblock_to_tree() is
still a bug.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
fs/ext3/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 8f4fdda..7f6c938 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -559,7 +559,7 @@ static int htree_dirblock_to_tree(struct file *dir_file,
{
struct buffer_head *bh;
struct ext3_dir_entry_2 *de, *top;
- int err, count = 0;
+ int err = 0, count = 0;
dxtrace(printk("In htree dirblock_to_tree: block %d\n", block));
if (!(bh = ext3_bread (NULL, dir, block, 0, &err)))
--
1.7.11.4
next prev parent reply other threads:[~2012-10-01 19:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-01 19:50 [PATCH 0/2] ext3_bread usage audit due non-initialized variable Carlos Maiolino
2012-10-01 19:50 ` Carlos Maiolino [this message]
2012-10-02 13:55 ` [PATCH 1/2] ext3: fix possible non-initialized variable on htree_dirblock_to_tree() Jan Kara
2012-10-01 19:50 ` [PATCH 2/2] ext3: ext3_bread usage audit Carlos Maiolino
2012-10-02 13:55 ` Jan Kara
2012-10-02 14:27 ` Carlos Maiolino
2012-10-04 12:38 ` Jan Kara
2012-10-03 2:59 ` [PATCH 2/2] ext3: ext3_bread usage audit [V2] Carlos Maiolino
2012-10-04 12:42 ` Jan Kara
2012-10-04 13:02 ` Jan Kara
2012-10-04 13:57 ` Carlos Maiolino
2012-10-04 14:29 ` Jan Kara
2012-10-04 17:47 ` Carlos Maiolino
2012-10-08 16:15 ` Jan Kara
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=1349121055-8168-2-git-send-email-cmaiolino@redhat.com \
--to=cmaiolino@redhat.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).