[PATCH RFC v3 03/44] target: fileio: check that the backing file supports ->{read,write}_iter
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Nov 16 11:25:27 UTC 2026
> With fd_async_io=1 the fileio backend calls ->read_iter() and
> ->write_iter() of the backing file directly. The synchronous path goes
> through vfs_iter_read() and vfs_iter_write() which check for them but
> the aio path doesn't. So a backing file without them calls a NULL
> pointer on its first I/O.
>
> Refuse such files when configuring the device. On the synchronous path
> every read or write that needed the missing method failed with EINVAL
> anyway.
>
> Fixes: 769031c92c8b ("scsi: target: target/file: Add support of direct and async I/O")
> Reviewed-by: Jan Kara <jack at suse.cz>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Reviewed-by: Chris Down <chris at chrisdown.name>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-work-loop-pseudo-v3-0-8cbbea1cf34f@kernel.org?part=3
More information about the Linux-security-module-archive
mailing list