[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241023151800.61444-1-aha310510@gmail.com>
Date: Thu, 24 Oct 2024 00:18:00 +0900
From: Jeongjun Park <aha310510@...il.com>
To: syzbot+b468b9fef56949c3b528@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] [bcachefs?] KASAN: null-ptr-deref Read in bch2_sb_set_upgrade_extra
#syz test git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
---
fs/bcachefs/sb-downgrade.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c
index ae715ff658e8..8767c33c2b51 100644
--- a/fs/bcachefs/sb-downgrade.c
+++ b/fs/bcachefs/sb-downgrade.c
@@ -143,6 +143,9 @@ UPGRADE_TABLE()
static int have_stripes(struct bch_fs *c)
{
+ if (IS_ERR_OR_NULL(c->btree_roots_known[BTREE_ID_stripes].b))
+ return 0;
+
return !btree_node_fake(c->btree_roots_known[BTREE_ID_stripes].b);
}
--
Powered by blists - more mailing lists