public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+1fc6f64c40a9d143cfb6@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter
Date: Wed, 06 Nov 2024 19:12:42 -0800	[thread overview]
Message-ID: <672c302a.050a0220.49393.016f.GAE@google.com> (raw)
In-Reply-To: <672b7858.050a0220.350062.0256.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter
Author: lizhi.xu@windriver.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..079ba61e24d1 100644
--- a/fs/netfs/read_collect.c
+++ b/fs/netfs/read_collect.c
@@ -512,9 +512,13 @@ 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);
+				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);
+				if (!was_async)
+					cond_resched();
 			} else {
 				__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
 				error = -ENODATA;

  reply	other threads:[~2024-11-07  3:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 14:08 [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter syzbot
2024-11-07  3:12 ` syzbot [this message]
2024-11-07  4:10 ` [syzbot] " syzbot
2024-11-07  5:58 ` syzbot
2024-11-07  9:35 ` syzbot
2024-11-08  1:47 ` syzbot
2024-11-08  2:18 ` syzbot
2024-11-08  3:40 ` [PATCH] netfs: If didn't read new data then abandon retry Lizhi Xu
2024-11-16  6:34   ` asmadeus
2024-12-09 15:53   ` David Howells
2024-12-13  7:26     ` Lizhi Xu
2024-12-13  8:41       ` David Howells
  -- strict thread matches above, loose matches on Subject: below --
2024-11-11  9:51 [syzbot] [v9fs?] BUG: stack guard page was hit in sys_open syzbot
2024-11-18  1:52 ` [syzbot] Re: [syzbot] [mm?] BUG: stack guard page was hit in v9fs_file_read_iter 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=672c302a.050a0220.49393.016f.GAE@google.com \
    --to=syzbot+1fc6f64c40a9d143cfb6@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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