Re: [syzbot] [jfs?] WARNING in dbAdjTree

From: Edward Adam Davis
Date: Tue Jan 23 2024 - 20:43:27 EST


please test WARNING in dbAdjTree

#syz test upstream master

diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c
index 8eec84c651bf..bed14d5169f8 100644
--- a/fs/jfs/jfs_dmap.c
+++ b/fs/jfs/jfs_dmap.c
@@ -2294,6 +2294,7 @@ static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno,
*/
dbitno = blkno & (BPERDMAP - 1);
word = dbitno >> L2DBWORD;
+ printk("dbitno: %d, blkno: %ld, word: %d, %s\n", dbitno, blkno, word, __func__);

/* block range better be within the dmap.
*/
@@ -2875,8 +2876,9 @@ static void dbAdjTree(dmtree_t *tp, int leafno, int newval, bool is_ctl)
/* pick up the index of the leaf for this leafno.
*/
lp = leafno + le32_to_cpu(tp->dmt_leafidx);
+ printk("lp: %d, leafno: %d, tp: %p, %s\n", lp, leafno, tp, __func__);

- if (WARN_ON_ONCE(lp >= size || lp < 0))
+ if (lp >= size || lp < 0)
return;

/* is the current value the same as the old value ? if so,