From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+e1dc29a4daf3f8051130@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [netfs?] KASAN: slab-use-after-free Write in io_submit_one
Date: Sat, 15 Feb 2025 12:10:24 +0800 [thread overview]
Message-ID: <tencent_69777A376EC6CD33652368897203A5C44405@qq.com> (raw)
In-Reply-To: <67aedac7.050a0220.21dd3.002d.GAE@google.com>
#syz test
diff --git a/fs/netfs/read_collect.c b/fs/netfs/read_collect.c
index f65affa5a9e4..72b08c1709fa 100644
--- a/fs/netfs/read_collect.c
+++ b/fs/netfs/read_collect.c
@@ -301,6 +301,8 @@ static void netfs_collect_read_results(struct netfs_io_request *rreq)
notes & ABANDON_SREQ ?
netfs_sreq_trace_put_abandon :
netfs_sreq_trace_put_done);
+ if (front == remove)
+ break;
}
trace_netfs_collect_stream(rreq, stream);
@@ -369,12 +371,17 @@ static void netfs_rreq_assess_dio(struct netfs_io_request *rreq)
}
}
+ spin_lock(&rreq->lock);
if (rreq->iocb) {
rreq->iocb->ki_pos += rreq->transferred;
- if (rreq->iocb->ki_complete)
+ if (rreq->iocb->ki_complete) {
rreq->iocb->ki_complete(
rreq->iocb, rreq->error ? rreq->error : rreq->transferred);
+ rreq->iocb = NULL;
+ }
}
+ spin_unlock(&rreq->lock);
+
if (rreq->netfs_ops->done)
rreq->netfs_ops->done(rreq);
if (rreq->origin == NETFS_DIO_READ)
next prev parent reply other threads:[~2025-02-15 4:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 5:55 [syzbot] " syzbot
2025-02-14 12:46 ` Edward Adam Davis
2025-02-14 12:57 ` [syzbot] " syzbot
2025-02-15 0:59 ` Edward Adam Davis
2025-02-15 1:23 ` [syzbot] " syzbot
2025-02-15 2:00 ` Edward Adam Davis
2025-02-15 2:19 ` [syzbot] " syzbot
2025-02-15 2:36 ` Edward Adam Davis
2025-02-15 2:57 ` [syzbot] " syzbot
2025-02-15 3:50 ` Edward Adam Davis
2025-02-15 3:51 ` [syzbot] " syzbot
2025-02-15 4:10 ` Edward Adam Davis [this message]
2025-02-15 4:32 ` syzbot
2025-02-15 5:15 ` Edward Adam Davis
2025-02-15 5:38 ` [syzbot] " syzbot
2025-02-15 7:43 ` Hillf Danton
2025-02-15 8:10 ` syzbot
2025-02-15 9:42 ` [PATCH] netfs: Prevent race conditions between aio read and read collection worker Edward Adam Davis
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=tencent_69777A376EC6CD33652368897203A5C44405@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+e1dc29a4daf3f8051130@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
all inboxes | Powered by JetHome®