]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Fix ext4_mb_initialize_context() to initialize all fields
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Jul 2009 13:45:52 +0000 (09:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Jul 2009 13:45:52 +0000 (09:45 -0400)
commitf59fa4d537373c497c4f4a1ab6d604ea418acb6f
tree5a221bd167ae7f1b0575fd24fbc5e4cdae18a598
parent6bba6badf1b442b7444d14fc58469db90d847299
ext4: Fix ext4_mb_initialize_context() to initialize all fields

Pavel Roskin pointed out that kmemcheck indicated that
ext4_mb_store_history() was accessing uninitialized values of
ac->ac_tail and ac->ac_buddy leading to garbage in the mballoc
history.  Fix this by initializing the entire structure to all zeros
first.

Also, two fields were getting doubly initialized by the caller of
ext4_mb_initialize_context, so remove them for efficiency's sake.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/mballoc.c