Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gfs2-v6.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fix from Andreas Gruenbacher:

- Fix boundary check in punch_hole

* tag 'gfs2-v6.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
gfs2: Fix invalid metadata access in punch_hole

+3 -2
+3 -2
fs/gfs2/bmap.c
··· 1718 1718 struct buffer_head *dibh, *bh; 1719 1719 struct gfs2_holder rd_gh; 1720 1720 unsigned int bsize_shift = sdp->sd_sb.sb_bsize_shift; 1721 - u64 lblock = (offset + (1 << bsize_shift) - 1) >> bsize_shift; 1721 + unsigned int bsize = 1 << bsize_shift; 1722 + u64 lblock = (offset + bsize - 1) >> bsize_shift; 1722 1723 __u16 start_list[GFS2_MAX_META_HEIGHT]; 1723 1724 __u16 __end_list[GFS2_MAX_META_HEIGHT], *end_list = NULL; 1724 1725 unsigned int start_aligned, end_aligned; ··· 1730 1729 u64 prev_bnr = 0; 1731 1730 __be64 *start, *end; 1732 1731 1733 - if (offset >= maxsize) { 1732 + if (offset + bsize - 1 >= maxsize) { 1734 1733 /* 1735 1734 * The starting point lies beyond the allocated metadata; 1736 1735 * there are no blocks to deallocate.