[PATCH RFC 02/41] nvmet: check that the file backend supports ->{read,write}_iter
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 10 09:23:13 UTC 2026
> The file backend calls ->read_iter() and ->write_iter() of the backing
> file directly but never checks that they exist. Everything that isn't a
> block device ends up in the file backend. So a namespace pointing to a
> file without them calls a NULL pointer on its first I/O. Only
> buffered_io=1 gets that far as the O_DIRECT open fails for such files.
>
> Refuse them when the namespace is enabled the same way zloop does since
> commit 0c10f8a1a7ae ("zloop: check that the zone backing file support
> ->{read,write}_iter").
>
> Fixes: d5eff33ee6f8 ("nvmet: add simple file backed ns support")
> 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=2
More information about the Linux-security-module-archive
mailing list