* [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2)
@ 2018-03-05 13:12 Andreas Gruenbacher
2018-03-05 13:51 ` Bob Peterson
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Gruenbacher @ 2018-03-05 13:12 UTC (permalink / raw)
To: cluster-devel.redhat.com
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 <agruenba@redhat.com>
---
fs/gfs2/bmap.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 86d6a4435c87..51f940e76c5e 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -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;
}
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2)
2018-03-05 13:12 [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2) Andreas Gruenbacher
@ 2018-03-05 13:51 ` Bob Peterson
0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2018-03-05 13:51 UTC (permalink / raw)
To: cluster-devel.redhat.com
----- 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 <agruenba@redhat.com>
| ---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-05 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 13:12 [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" (2) Andreas Gruenbacher
2018-03-05 13:51 ` Bob Peterson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.