linux/fs/iomap
Darrick J. Wong ca19f8f510 iomap: reject delalloc mappings during writeback
commit d320f160aa upstream.

Filesystems should never provide a delayed allocation mapping to
writeback; they're supposed to allocate the space before replying.
This can lead to weird IO errors and crashes in the block layer if the
filesystem is being malicious, or if it hadn't set iomap->dev because
it's a delalloc mapping.

Fix this by failing writeback on delalloc mappings.  Currently no
filesystems actually misbehave in this manner, but we ought to be
stricter about things like that.

Cc: stable@vger.kernel.org # v5.5
Fixes: 598ecfbaa7 ("iomap: lift the xfs writeback code to iomap")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://patch.msgid.link/20260302173002.GL13829@frogsfrogsfrogs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:35 +01:00
..
buffered-io.c iomap: account for unaligned end offsets when truncating read range 2026-01-02 12:56:38 +01:00
direct-io.c iomap: fix submission side handling of completion side errors 2026-02-26 14:59:00 -08:00
fiemap.c iomap: header diet 2025-07-14 10:51:31 +02:00
internal.h iomap: move all ioend handling to ioend.c 2025-07-14 10:51:32 +02:00
ioend.c iomap: reject delalloc mappings during writeback 2026-03-19 16:08:35 +01:00
iter.c iomap: header diet 2025-07-14 10:51:31 +02:00
Makefile iomap: build the writeback code without CONFIG_BLOCK 2025-07-14 10:51:33 +02:00
seek.c iomap: header diet 2025-07-14 10:51:31 +02:00
swapfile.c iomap: header diet 2025-07-14 10:51:31 +02:00
trace.c iomap: header diet 2025-07-14 10:51:31 +02:00
trace.h iomap: trace iomap_zero_iter zeroing activities 2025-09-19 14:17:11 +02:00