From: Jan Kara <jack@suse.cz>
To: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 1/2] ext3: fix possible non-initialized variable on htree_dirblock_to_tree()
Date: Tue, 2 Oct 2012 15:55:52 +0200 [thread overview]
Message-ID: <20121002135552.GF22777@quack.suse.cz> (raw)
In-Reply-To: <1349121055-8168-2-git-send-email-cmaiolino@redhat.com>
On Mon 01-10-12 16:50:54, Carlos Maiolino wrote:
> 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.
This is a good cleanup. I've taken that into my tree.
Honza
>
> 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-10-02 13:55 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 ` [PATCH 1/2] ext3: fix possible non-initialized variable on htree_dirblock_to_tree() Carlos Maiolino
2012-10-02 13:55 ` Jan Kara [this message]
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=20121002135552.GF22777@quack.suse.cz \
--to=jack@suse.cz \
--cc=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).