[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_8B769767163C3F3616964237F04BC074B109@qq.com>
Date: Sat, 15 Jun 2024 10:27:00 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+4366624c0b5aac4906cf@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bcachefs?] WARNING in bch2_fs_read_write_early
please test no write lock in bch2_fs_read_write_early
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ccbdf43d5e7
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index 51918acfd726..b27a4327274d 100644
--- a/fs/bcachefs/snapshot.c
+++ b/fs/bcachefs/snapshot.c
@@ -1566,7 +1566,9 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
return 0;
if (!test_bit(BCH_FS_started, &c->flags)) {
+ down_write(&c->state_lock);
ret = bch2_fs_read_write_early(c);
+ up_write(&c->state_lock);
bch_err_msg(c, ret, "deleting dead snapshots: error going rw");
if (ret)
return ret;
Powered by blists - more mailing lists