public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Julian Sun <sunjunchao2870@gmail.com>
To: syzbot+296b1c84b9cbf306e5a0@syzkaller.appspotmail.com
Cc: brauner@kernel.org, chandan.babu@oracle.com, djwong@kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-xfs@vger.kernel.org, sunjunchao2870@gmail.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [iomap?] [xfs?] WARNING in iomap_write_begin
Date: Mon,  2 Sep 2024 13:04:55 +0800	[thread overview]
Message-ID: <20240902050455.474396-1-sunjunchao2870@gmail.com> (raw)
In-Reply-To: <0000000000002f63ae0620e563e2@google.com>

Test the following patch.

#syz test: upstream ee9a43b7cfe2

diff --git a/fs/iomap/iter.c b/fs/iomap/iter.c
index 79a0614eaab7..6e3f6109cac5 100644
--- a/fs/iomap/iter.c
+++ b/fs/iomap/iter.c
@@ -76,7 +76,8 @@ int iomap_iter(struct iomap_iter *iter, const struct iomap_ops *ops)
 	int ret;
 
 	if (iter->iomap.length && ops->iomap_end) {
-		ret = ops->iomap_end(iter->inode, iter->pos, iomap_length(iter),
+		ret = ops->iomap_end(iter->inode, iter->pos,
+				iter->processed > 0 ? iomap_length(iter) : iter->iomap.length,
 				iter->processed > 0 ? iter->processed : 0,
 				iter->flags, &iter->iomap);
 		if (ret < 0 && !iter->processed)

  reply	other threads:[~2024-09-02  5:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  8:14 [syzbot] [iomap?] [xfs?] WARNING in iomap_write_begin syzbot
2024-08-27  8:54 ` Julian Sun
2024-08-27 10:13   ` Christoph Hellwig
2024-08-27 11:13     ` Julian Sun
2024-08-27 11:37       ` Christoph Hellwig
2024-08-27 11:40         ` Aleksandr Nogikh
2024-08-27 11:56           ` Julian Sun
2024-08-27 12:38           ` syzbot
2024-08-30  9:48 ` Julian Sun
2024-08-30 10:19   ` syzbot
2024-08-30 11:31   ` Julian Sun
2024-08-30 12:04     ` syzbot
2024-09-02  5:04       ` Julian Sun [this message]
2024-09-02  5:28         ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240902050455.474396-1-sunjunchao2870@gmail.com \
    --to=sunjunchao2870@gmail.com \
    --cc=brauner@kernel.org \
    --cc=chandan.babu@oracle.com \
    --cc=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=syzbot+296b1c84b9cbf306e5a0@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox