gfs2: Fixes to "Implement iomap for block_map" (2)
Andreas Gruenbacher
maintainerPATCH 1/1 gfs2: Fixes to "Implement iomap for block_map" (2)
It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for block_map"' introduced another bug in gfs2_iomap_begin that can cause gfs2_block_map to set bh->b_size of an actual buffer to 0. This can lead to arbitrary incorrect behavior including crashes or disk corruption. Revert the incorrect part of that commit.
Signed-off-by Andreas Gruenbacher <[email protected]>
--- fs/gfs2/bmap.c | 3 --- 1 file changed, 3 deletions(-)
fs/gfs2/bmap.c +0 -3
@@ -807,9 +807,6 @@ int gfs2_iomap_begin(struct inode *inode, loff_t pos, loff_t length, iomap->length =hole_size (inode, lblock, &mp); else iomap->length = size - pos; - }else { -if (height <= ip->i_height) - iomap->length =hole_size (inode, lblock, &mp); } goto out_release; }
Signature · 1 line
2.14.3
PATCH 1/1 gfs2: Fixes to "Implement iomap for block_map" (2)
----- Original Message -----
| It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for | block_map"' introduced another bug in gfs2_iomap_begin that can cause | gfs2_block_map to set bh->b_size of an actual buffer to 0. This can | lead to arbitrary incorrect behavior including crashes or disk | corruption. Revert the incorrect part of that commit. | | Signed-off-by: Andreas Gruenbacher <[email protected]> | ---
Hi,
Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=dc49cacbdc4eecae05713c03e3ab6ac0b7c06c1c
Regards,
Bob Peterson
Red Hat File Systems