[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_11342DC56C149450EACEED06CE087BDE6F0A@qq.com>
Date: Wed, 25 Sep 2024 20:09:47 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+c0360e8367d6d8d04a66@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bcachefs?] kernel BUG in vfs_get_tree
db
#syz test
diff --git a/fs/bcachefs/btree_node_scan.c b/fs/bcachefs/btree_node_scan.c
index b28c649c6838..aa247ca6270d 100644
--- a/fs/bcachefs/btree_node_scan.c
+++ b/fs/bcachefs/btree_node_scan.c
@@ -280,7 +280,7 @@ static int read_btree_nodes(struct find_btree_nodes *f)
percpu_ref_put(&ca->io_ref);
closure_put(&cl);
f->ret = ret;
- bch_err(c, "error starting kthread: %i", ret);
+ bch_err(c, "error starting kthread: %i %d", ret, PTR_ERR(t));
break;
}
}
@@ -358,6 +358,7 @@ int bch2_scan_for_btree_nodes(struct bch_fs *c)
mutex_init(&f->lock);
ret = read_btree_nodes(f);
+ pr_info("ret: %d, %s\n", ret, __func__);
if (ret)
return ret;
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index 4a1bb07a2574..49d711e9837e 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -2148,6 +2148,7 @@ static int bch2_fs_get_tree(struct fs_context *fc)
out:
fc->root = dget(sb->s_root);
err:
+ pr_info("ret: %d, sb: %p, fc: %p, fcroot: %p, %s\n", ret, sb, fc, fc->root, __func__);
darray_exit(&devs_to_fs);
bch2_darray_str_exit(&devs);
if (ret)
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index be1e7ca4362f..aeeeda0f01d4 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -522,8 +522,8 @@ static int read_btree_roots(struct bch_fs *c)
bch2_btree_id_str(i)) ||
mustfix_fsck_err_on((ret = r->error = bch2_btree_root_read(c, i, &r->key, r->level)),
c, btree_root_read_error,
- "error reading btree root %s l=%u: %s",
- bch2_btree_id_str(i), r->level, bch2_err_str(ret))) {
+ "error reading btree root %s l=%u: %s ret: %d",
+ bch2_btree_id_str(i), r->level, bch2_err_str(ret), ret)) {
if (btree_id_is_alloc(i)) {
c->opts.recovery_passes |= BIT_ULL(BCH_RECOVERY_PASS_check_allocations);
c->opts.recovery_passes |= BIT_ULL(BCH_RECOVERY_PASS_check_alloc_info);
@@ -849,6 +849,7 @@ int bch2_fs_recovery(struct bch_fs *c)
atomic64_add(1 << 16, &c->key_version);
ret = read_btree_roots(c);
+ pr_info("ret: %d, %s\n", ret, __func__);
if (ret)
goto err;
@@ -967,6 +968,7 @@ int bch2_fs_recovery(struct bch_fs *c)
ret = 0;
out:
+ pr_info("out ret: %d, %s\n", ret, __func__);
bch2_flush_fsck_errs(c);
if (!c->opts.retain_recovery_info) {
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 873e4be7e1dc..74d0af559a77 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -1036,6 +1036,7 @@ int bch2_fs_start(struct bch_fs *c)
ret = BCH_SB_INITIALIZED(c->disk_sb.sb)
? bch2_fs_recovery(c)
: bch2_fs_initialize(c);
+ pr_info("2ret: %d, %s\n", ret, __func__);
if (ret)
goto err;
Powered by blists - more mailing lists