All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: [PATCH] ext4: ext4_mb_initialize_context() forgets to initialize some fields
Date: Fri, 10 Jul 2009 16:47:54 -0400	[thread overview]
Message-ID: <20090710204754.18406.15771.stgit@mj.roinet.com> (raw)

kmemcheck indicates that ext4_mb_store_histroy() accesses uninitialized
values of ac->ac_tail and ac->ac_buddy.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 fs/ext4/mballoc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 519a0a6..a5a9a35 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4223,6 +4223,8 @@ ext4_mb_initialize_context(struct ext4_allocation_context *ac,
 	ac->ac_groups_scanned = 0;
 	ac->ac_ex_scanned = 0;
 	ac->ac_found = 0;
+	ac->ac_tail = 0;
+	ac->ac_buddy = 0;
 	ac->ac_sb = sb;
 	ac->ac_inode = ar->inode;
 	ac->ac_o_ex.fe_logical = ar->logical;

             reply	other threads:[~2009-07-10 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-10 20:47 Pavel Roskin [this message]
2009-07-10 20:59 ` [PATCH] ext4: ext4_mb_initialize_context() forgets to initialize some fields Eric Sandeen
2009-07-13 13:46   ` Theodore Tso
2009-07-13 21:27     ` Pavel Roskin

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=20090710204754.18406.15771.stgit@mj.roinet.com \
    --to=proski@gnu.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 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.