[PATCH RFC 03/41] target: fileio: check that the backing file supports ->{read,write}_iter

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 10 09:24:16 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")
> 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/20261110-work-loop-pseudo-v1-0-4c998976c6c7@kernel.org?part=3




More information about the Linux-security-module-archive mailing list