[PATCH RFC v2 03/42] target: fileio: check that the backing file supports ->{read,write}_iter
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sat Nov 14 13:18:37 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>
> 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/20261114-work-loop-pseudo-v2-0-98639a2286fb@kernel.org?part=3
More information about the Linux-security-module-archive
mailing list