[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_A2AE25998DF812235DBE5DFD99584FD18D07@qq.com>
Date: Sat, 15 Jun 2024 18:43:22 +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;
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index bbe9000260d0..cbccc0bbee76 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -99,9 +99,9 @@ static const unsigned long LOCKF_USED_IN_IRQ_READ =
#define MAX_STACK_TRACE_ENTRIES 262144UL
#define STACK_TRACE_HASH_SIZE 8192
#else
-#define MAX_LOCKDEP_ENTRIES (1UL << CONFIG_LOCKDEP_BITS)
+#define MAX_LOCKDEP_ENTRIES (1UL << 19)
-#define MAX_LOCKDEP_CHAINS_BITS CONFIG_LOCKDEP_CHAINS_BITS
+#define MAX_LOCKDEP_CHAINS_BITS 20
/*
* Stack-trace: tightly packed array of stack backtrace
Powered by blists - more mailing lists