public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeongjun Park <aha310510@gmail.com>
To: syzbot+7c48153a9d788824044b@syzkaller.appspotmail.com
Cc: syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [netfs?] KASAN: slab-use-after-free Read in iov_iter_advance
Date: Sat, 21 Sep 2024 02:14:09 +0900	[thread overview]
Message-ID: <20240920171409.4054-1-aha310510@gmail.com> (raw)
In-Reply-To: <66ed861a.050a0220.2abe4d.0015.GAE@google.com>

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ master

---
 fs/netfs/write_issue.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c
index 04e66d587f77..8e708d1f7c9d 100644
--- a/fs/netfs/write_issue.c
+++ b/fs/netfs/write_issue.c
@@ -427,6 +427,8 @@ static int netfs_write_folio(struct netfs_io_request *wreq,
 	 * Also skip uploading for data that's been read and just needs copying
 	 * to the cache.
 	 */
+	
+	spin_lock(&wreq->lock);
 	for (int s = 0; s < NR_IO_STREAMS; s++) {
 		stream = &wreq->io_streams[s];
 		stream->submit_off = foff;
@@ -488,6 +490,7 @@ static int netfs_write_folio(struct netfs_io_request *wreq,
 		for (int s = 0; s < NR_IO_STREAMS; s++)
 			netfs_issue_write(wreq, &wreq->io_streams[s]);
 
+	spin_unlock(&wreq->lock);
 	_leave(" = 0");
 	return 0;
 }
--

  reply	other threads:[~2024-09-20 17:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-20 14:26 [syzbot] [netfs?] KASAN: slab-use-after-free Read in iov_iter_advance syzbot
2024-09-20 17:14 ` Jeongjun Park [this message]
2024-09-20 17:35   ` syzbot
2024-09-20 23:54 ` Hillf Danton
2024-09-21  0:18   ` syzbot
2024-09-21  2:06 ` Hillf Danton
2024-09-21  2:50   ` syzbot
2024-09-21  8:09 ` Hillf Danton
2024-09-21  9:04   ` syzbot
2024-09-21  9:25 ` Hillf Danton
2024-09-21 10:10   ` syzbot
2024-10-29  8:15 ` 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=20240920171409.4054-1-aha310510@gmail.com \
    --to=aha310510@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+7c48153a9d788824044b@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