[PATCH v2] fs: Fix page_mkwrite off-by-one errors

Richard Weinberger richard at nod.at
Fri Nov 29 08:35:53 PST 2019

----- Ursprüngliche Mail -----
> Von: "Andreas Gruenbacher" <agruenba at redhat.com>
> An: "Christoph Hellwig" <hch at infradead.org>, "Darrick" <darrick.wong at oracle.com>
> CC: "Andreas Gruenbacher" <agruenba at redhat.com>, "torvalds" <torvalds at linux-foundation.org>, "linux-kernel"
> <linux-kernel at vger.kernel.org>, "Al Viro" <viro at zeniv.linux.org.uk>, "Jeff Layton" <jlayton at kernel.org>, "Sage Weil"
> <sage at redhat.com>, "Ilya Dryomov" <idryomov at gmail.com>, "tytso" <tytso at mit.edu>, "Andreas Dilger"
> <adilger.kernel at dilger.ca>, "Jaegeuk Kim" <jaegeuk at kernel.org>, "Chao Yu" <chao at kernel.org>, linux-xfs at vger.kernel.org,
> "linux-fsdevel" <linux-fsdevel at vger.kernel.org>, "richard" <richard at nod.at>, "Artem Bityutskiy" <dedekind1 at gmail.com>,
> "Adrian Hunter" <adrian.hunter at intel.com>, ceph-devel at vger.kernel.org, linux-ext4 at vger.kernel.org,
> linux-f2fs-devel at lists.sourceforge.net, "linux-mtd" <linux-mtd at lists.infradead.org>, "Chris Mason" <clm at fb.com>, "Josef
> Bacik" <josef at toxicpanda.com>, "David Sterba" <dsterba at suse.com>, "linux-btrfs" <linux-btrfs at vger.kernel.org>
> Gesendet: Freitag, 29. November 2019 15:20:45
> Betreff: [PATCH v2] fs: Fix page_mkwrite off-by-one errors

> The check in block_page_mkwrite meant to determine whether an offset is
> within the inode size is off by one.  This bug has spread to
> iomap_page_mkwrite and to several filesystems (ubifs, ext4, f2fs, ceph).
> To fix that, introduce a new page_mkwrite_check_truncate helper that
> checks for truncate and computes the bytes in the page up to EOF, and
> use that helper in the above mentioned filesystems and in btrfs.
> Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>

Thank you for fixing UBIFS!

Acked-by: Richard Weinberger <richard at nod.at>


More information about the linux-mtd mailing list