mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+1a8e2b31f2ac9bd3d148@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [f2fs?] KASAN: null-ptr-deref Write in f2fs_stop_gc_thread
Date: Sat, 27 Jul 2024 12:07:50 +0800	[thread overview]
Message-ID: <tencent_411BA74B731B5425C2BA5ABB2C33119EE808@qq.com> (raw)
In-Reply-To: <0000000000005c7ccb061e032b9b@google.com>

use s_umount read lock sync remount and shutdown

#syz test: upstream 2c9b3512402e

diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c1ad9b278c47..3940c0b11868 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2280,7 +2280,9 @@ int f2fs_do_shutdown(struct f2fs_sb_info *sbi, unsigned int flag,
 	if (readonly)
 		goto out;
 
+	down_read(&sb->s_umount);
 	f2fs_stop_gc_thread(sbi);
+	up_read(&sb->s_umount);
 	f2fs_stop_discard_thread(sbi);
 
 	f2fs_drop_discard_cmd(sbi);


  parent reply	other threads:[~2024-07-27  4:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 19:20 syzbot
2024-07-25  1:32 ` [syzbot] " syzbot
2024-07-25  2:21 ` syzbot
2024-07-25  5:08 ` syzbot
2024-07-25  7:27 ` syzbot
2024-07-25  8:08 ` syzbot
2024-07-25 12:49 ` syzbot
2024-07-25 13:19 ` syzbot
2024-07-25 13:53 ` syzbot
2024-07-26 11:08 ` Edward Adam Davis
2024-07-26 17:02   ` syzbot
2024-07-27  2:08 ` Edward Adam Davis
2024-07-27  2:48   ` syzbot
2024-07-27  3:38 ` Edward Adam Davis
2024-07-27  4:01   ` syzbot
2024-07-27  4:07 ` Edward Adam Davis [this message]
2024-07-27  5:13   ` syzbot
2024-07-27  5:56 ` [PATCH] f2fs: Add mutex to prevent gc task from being accessed before initialization Edward Adam Davis
     [not found] <20240725013244.474343-1-lizhi.xu@windriver.com>
2024-07-25  1:54 ` [syzbot] [f2fs?] KASAN: null-ptr-deref Write in f2fs_stop_gc_thread syzbot
     [not found] <20240725022132.965591-1-lizhi.xu@windriver.com>
2024-07-25  3:30 ` syzbot
     [not found] <20240725050750.3007233-1-lizhi.xu@windriver.com>
2024-07-25  6:54 ` syzbot
     [not found] <20240725072746.503703-1-lizhi.xu@windriver.com>
2024-07-25  8:04 ` syzbot
     [not found] <20240725080829.841010-1-lizhi.xu@windriver.com>
2024-07-25 12:27 ` syzbot
     [not found] <20240725124919.3618893-1-lizhi.xu@windriver.com>
2024-07-25 13:06 ` syzbot
     [not found] <20240725131923.3802594-1-lizhi.xu@windriver.com>
2024-07-25 13:47 ` syzbot
     [not found] <20240725135334.4018863-1-lizhi.xu@windriver.com>
2024-07-25 14:30 ` 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=tencent_411BA74B731B5425C2BA5ABB2C33119EE808@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+1a8e2b31f2ac9bd3d148@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®