linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: ext4_mb_initialize_context() forgets to initialize some fields
@ 2009-07-10 20:47 Pavel Roskin
  2009-07-10 20:59 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2009-07-10 20:47 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso

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;

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

end of thread, other threads:[~2009-07-13 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10 20:47 [PATCH] ext4: ext4_mb_initialize_context() forgets to initialize some fields Pavel Roskin
2009-07-10 20:59 ` Eric Sandeen
2009-07-13 13:46   ` Theodore Tso
2009-07-13 21:27     ` Pavel Roskin

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