[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_1B2ECE8078726E5C2D856C0497A0E80EED0A@qq.com>
Date: Fri, 19 Jan 2024 13:51:37 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+fd404f6b03a58e8bc403@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [exfat?] kernel BUG in iov_iter_revert
please test kernel BUG in iov_iter_revert
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 052d534373b7
diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
index 522edcbb2ce4..af8870145f67 100644
--- a/fs/exfat/inode.c
+++ b/fs/exfat/inode.c
@@ -534,7 +534,8 @@ static ssize_t exfat_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
size = pos + ret;
/* zero the unwritten part in the partially written block */
- if (rw == READ && pos < ei->valid_size && ei->valid_size < size) {
+ if (ret == -EIOCBQUEUED && rw == READ && pos < ei->valid_size &&
+ ei->valid_size < size) {
iov_iter_revert(iter, size - ei->valid_size);
iov_iter_zero(size - ei->valid_size, iter);
}
Powered by blists - more mailing lists