Commit 184b147b authored by Lizhi Xu's avatar Lizhi Xu Committed by Greg Kroah-Hartman
Browse files

loop: Add sanity check for read/write_iter



[ Upstream commit f5c84eff ]

Some file systems do not support read_iter/write_iter, such as selinuxfs
in this issue.
So before calling them, first confirm that the interface is supported and
then call it.

It is releavant in that vfs_iter_read/write have the check, and removal
of their used caused szybot to be able to hit this issue.

Fixes: f2fed441 ("loop: stop using vfs_iter__{read,write} for buffered I/O")
Reported-by: default avatar <syzbot+6af973a3b8dfd2faefdc@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=6af973a3b8dfd2faefdc


Signed-off-by: default avatarLizhi Xu <lizhi.xu@windriver.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250428143626.3318717-1-lizhi.xu@windriver.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a781ffe4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment