[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <672c3db0.050a0220.350062.0286.GAE@google.com>
Date: Wed, 06 Nov 2024 20:10:24 -0800
From: syzbot <syzbot+1fc6f64c40a9d143cfb6@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter
Author: lizhi.xu@...driver.com
add resched to avoid retry too frequently when rreq need to retry
#syz test
diff --git a/fs/netfs/read_collect.c b/fs/netfs/read_collect.c
index b18c65ba5580..eb4fc1f62000 100644
--- a/fs/netfs/read_collect.c
+++ b/fs/netfs/read_collect.c
@@ -366,6 +366,7 @@ static void netfs_rreq_assess(struct netfs_io_request *rreq)
//netfs_rreq_is_still_valid(rreq);
if (test_and_clear_bit(NETFS_RREQ_NEED_RETRY, &rreq->flags)) {
+ cond_resched();
netfs_retry_reads(rreq);
return;
}
@@ -512,9 +513,15 @@ void netfs_read_subreq_terminated(struct netfs_io_subrequest *subreq,
__set_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags);
__clear_bit(NETFS_SREQ_NO_PROGRESS, &subreq->flags);
set_bit(NETFS_RREQ_NEED_RETRY, &rreq->flags);
+ printk("async: %d, r: %p, %s\n", was_async, rreq, __func__);
+ if (!was_async)
+ cond_resched();
} else if (!__test_and_set_bit(NETFS_SREQ_NO_PROGRESS, &subreq->flags)) {
__set_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags);
set_bit(NETFS_RREQ_NEED_RETRY, &rreq->flags);
+ printk("async: %d, r: %p, %s\n", was_async, rreq, __func__);
+ if (!was_async)
+ cond_resched();
} else {
__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
error = -ENODATA;
Powered by blists - more mailing lists