From: Pavel Skripkin <paskripkin@gmail.com>
To: syzbot <syzbot+c9ff4822a62eee994ea3@syzkaller.appspotmail.com>,
adilger.kernel@dilger.ca, clang-built-linux@googlegroups.com,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
nathan@kernel.org, ndesaulniers@google.com,
syzkaller-bugs@googlegroups.com, tytso@mit.edu
Subject: Re: [syzbot] INFO: task hung in ext4_fill_super
Date: Fri, 6 Aug 2021 10:45:32 +0300 [thread overview]
Message-ID: <daae3696-aed8-a0b6-9470-d76ab4901b7d@gmail.com> (raw)
In-Reply-To: <000000000000b6692805c8d0fae6@google.com>
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
On 8/5/21 5:46 PM, syzbot wrote:
> Hello,
>
> syzbot has tested the proposed patch and the reproducer did not trigger any issue:
>
> Reported-and-tested-by: syzbot+c9ff4822a62eee994ea3@syzkaller.appspotmail.com
>
> Tested on:
>
> commit: 251a1524 Merge tag 'scsi-fixes' of git://git.kernel.or..
> git tree: upstream
> kernel config: https://syzkaller.appspot.com/x/.config?x=166c8f6532dd88df
> dashboard link: https://syzkaller.appspot.com/bug?extid=c9ff4822a62eee994ea3
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
> patch: https://syzkaller.appspot.com/x/patch.diff?x=160a3301300000
>
> Note: testing is done by a robot and is best-effort only.
>
#syz test
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
With regards,
Pavel Skripkin
[-- Attachment #2: 0001-ext4-fix-kthread_should_stop-while-TASK_RUNNING.patch --]
[-- Type: text/x-patch, Size: 1032 bytes --]
From f31fdca900d687994a880dfd675d0a46da1eaec9 Mon Sep 17 00:00:00 2001
From: Pavel Skripkin <paskripkin@gmail.com>
Date: Fri, 6 Aug 2021 10:40:31 +0300
Subject: [PATCH] ext4: fix kthread_should_stop() while TASK_RUNNING
/* ... */
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
---
fs/ext4/mmp.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
index bc364c119af6..fd1985b79a8d 100644
--- a/fs/ext4/mmp.c
+++ b/fs/ext4/mmp.c
@@ -183,9 +183,15 @@ static int kmmpd(void *data)
}
diff = jiffies - last_update_time;
- if (diff < mmp_update_interval * HZ)
- schedule_timeout_interruptible(mmp_update_interval *
- HZ - diff);
+ if (diff < mmp_update_interval * HZ) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ if (kthread_should_stop()) {
+ __set_current_state(TASK_RUNNING);
+ break;
+ }
+
+ schedule_timeout(mmp_update_interval * HZ - diff);
+ }
/*
* We need to make sure that more than mmp_check_interval
--
2.32.0
next prev parent reply other threads:[~2021-08-06 7:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-16 9:56 [syzbot] INFO: task hung in ext4_fill_super syzbot
2021-06-16 16:22 ` Pavel Skripkin
2021-06-16 18:28 ` syzbot
2021-08-05 14:26 ` Pavel Skripkin
2021-08-05 14:46 ` syzbot
2021-08-06 7:45 ` Pavel Skripkin [this message]
2021-08-06 10:14 ` 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=daae3696-aed8-a0b6-9470-d76ab4901b7d@gmail.com \
--to=paskripkin@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=syzbot+c9ff4822a62eee994ea3@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).