History

ext2: Fix oops in ext2_get_block() called from ext2_quota_write()

ext2_quota_write() doesn't properly setup bh it passes to ext2_get_block() and thus we hit assertion BUG_ON(maxblocks == 0) in ext2_get_blocks() (or we could actually ask for mapping arbitrary number of blocks depending on whatever value was on stack). Fix ext2_quota_write() to properly fill in number of blocks to map.

Jan Kara committed 12 years ago

Commit df4e7ac1 parent dea4f481 file · +1 −0Browse files

Unified · Split

fs/ext2/super.c+1−0
@@ -1493,6 +1493,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type, · 1492 unmodified lines
1493 sb->s_blocksize - offset : towrite;1493 sb->s_blocksize - offset : towrite;
1494 1494
1495 tmp_bh.b_state = 0;1495 tmp_bh.b_state = 0;
1496 tmp_bh.b_size = sb->s_blocksize;
1496 err = ext2_get_block(inode, blk, &tmp_bh, 1);1497 err = ext2_get_block(inode, blk, &tmp_bh, 1);
1497 if (err < 0)1498 if (err < 0)
1498 goto out;1499 goto out;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t