aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorManish Katiyar <mkatiyar@gmail.com>2009-02-12 15:57:04 -0500
committerJan Kara <jack@suse.cz>2009-03-25 21:18:38 -0400
commitc16831b4cc9b0805adf8ca3001752a7ec10a17bf (patch)
tree09e727619e61f9531c879e907eb37f0735cf6f79 /fs
parent620372a9ffc6f1239a4f379ff145de9e4b5d23ba (diff)
ext2: Zero our b_size in ext2_quota_read()
ext2_quota_read() doesn't initialize tmp_bh.b_size before calling ext2_get_block() where we access it. Since it is a local variable it might contain some garbage. Make sure it is filled with reasonable value before passing. Signed-off-by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext2/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 7c6e3606f0ec..f983225266dc 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1331,6 +1331,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data,
1331 sb->s_blocksize - offset : toread; 1331 sb->s_blocksize - offset : toread;
1332 1332
1333 tmp_bh.b_state = 0; 1333 tmp_bh.b_state = 0;
1334 tmp_bh.b_size = sb->s_blocksize;
1334 err = ext2_get_block(inode, blk, &tmp_bh, 0); 1335 err = ext2_get_block(inode, blk, &tmp_bh, 0);
1335 if (err < 0) 1336 if (err < 0)
1336 return err; 1337 return err;