All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [jfs?] WARNING in dbAdjTree
@ 2024-01-18  7:38 syzbot
  2024-01-24  1:38 ` Edward Adam Davis
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2024-01-18  7:38 UTC (permalink / raw)
  To: jfs-discussion, linux-fsdevel, linux-kernel, shaggy, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    052d534373b7 Merge tag 'exfat-for-6.8-rc1' of git://git.ke..
git tree:       upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=140a08b3e80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=36f64072074e3eab
dashboard link: https://syzkaller.appspot.com/bug?extid=ab18fa9c959320611727
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15b39935e80000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10d619f5e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/395e14e0d581/disk-052d5343.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d3c73d08be99/vmlinux-052d5343.xz
kernel image: https://storage.googleapis.com/syzbot-assets/80968415c40b/bzImage-052d5343.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d58cff47d922/mount_0.gz

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=142eec2be80000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=162eec2be80000
console output: https://syzkaller.appspot.com/x/log.txt?x=122eec2be80000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ab18fa9c959320611727@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 109 at fs/jfs/jfs_dmap.c:2879 dbAdjTree+0x2d9/0x3d0 fs/jfs/jfs_dmap.c:2879
Modules linked in:
CPU: 0 PID: 109 Comm: jfsCommit Not tainted 6.7.0-syzkaller-09928-g052d534373b7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:dbAdjTree+0x2d9/0x3d0 fs/jfs/jfs_dmap.c:2879
Code: e8 4c 13 8d fe 0f b6 14 24 38 da 0f 85 a1 fe ff ff 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f e9 7d 18 8d fe e8 78 18 8d fe 90 <0f> 0b 90 eb e2 e8 0d 8f e4 fe e9 52 fe ff ff e8 03 8f e4 fe e9 79
RSP: 0018:ffffc900020bfa88 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000155 RCX: ffffffff82faf5c9
RDX: ffff8880197f3b80 RSI: ffffffff82faf828 RDI: 0000000000000004
RBP: ffff8880231c4010 R08: 0000000000000004 R09: 0000000000000155
R10: 0000000000030056 R11: ffffffff8acf1fa0 R12: 0000000000000004
R13: 0000000000030056 R14: ffff8880231c4010 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f67c3d5d130 CR3: 000000000cf79000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 dbJoin+0x267/0x2c0 fs/jfs/jfs_dmap.c:2847
 dbFreeBits+0x15c/0x8f0 fs/jfs/jfs_dmap.c:2338
 dbFreeDmap+0x62/0x1a0 fs/jfs/jfs_dmap.c:2087
 dbFree+0x266/0x550 fs/jfs/jfs_dmap.c:409
 txFreeMap+0x9a9/0xe60 fs/jfs/jfs_txnmgr.c:2534
 txUpdateMap+0x3f1/0xd10 fs/jfs/jfs_txnmgr.c:2330
 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline]
 jfs_lazycommit+0x5e4/0xb20 fs/jfs/jfs_txnmgr.c:2733
 kthread+0x2c6/0x3a0 kernel/kthread.c:388
 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-18  7:38 [syzbot] [jfs?] WARNING in dbAdjTree syzbot
@ 2024-01-24  1:38 ` Edward Adam Davis
  2024-01-24  1:38   ` syzbot
  2024-01-24  1:43 ` Edward Adam Davis
  2024-01-24  1:45 ` Edward Adam Davis
  2 siblings, 1 reply; 7+ messages in thread
From: Edward Adam Davis @ 2024-01-24  1:38 UTC (permalink / raw)
  To: syzbot+ab18fa9c959320611727; +Cc: linux-kernel, syzkaller-bugs

please test WARNING in dbAdjTree

#syz test upstream

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,


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-24  1:38 ` Edward Adam Davis
@ 2024-01-24  1:38   ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-01-24  1:38 UTC (permalink / raw)
  To: eadavis; +Cc: eadavis, linux-kernel, syzkaller-bugs

> please test WARNING in dbAdjTree
>
> #syz test upstream

want either no args or 2 args (repo, branch), got 1

>
> 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,
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-18  7:38 [syzbot] [jfs?] WARNING in dbAdjTree syzbot
  2024-01-24  1:38 ` Edward Adam Davis
@ 2024-01-24  1:43 ` Edward Adam Davis
  2024-01-24  1:43   ` syzbot
  2024-01-24  1:45 ` Edward Adam Davis
  2 siblings, 1 reply; 7+ messages in thread
From: Edward Adam Davis @ 2024-01-24  1:43 UTC (permalink / raw)
  To: syzbot+ab18fa9c959320611727; +Cc: linux-kernel, syzkaller-bugs

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,


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-24  1:43 ` Edward Adam Davis
@ 2024-01-24  1:43   ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-01-24  1:43 UTC (permalink / raw)
  To: eadavis; +Cc: eadavis, linux-kernel, syzkaller-bugs

> please test WARNING in dbAdjTree
>
> #syz test upstream master

"upstream" does not look like a valid git repo address.

>
> 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,
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-18  7:38 [syzbot] [jfs?] WARNING in dbAdjTree syzbot
  2024-01-24  1:38 ` Edward Adam Davis
  2024-01-24  1:43 ` Edward Adam Davis
@ 2024-01-24  1:45 ` Edward Adam Davis
  2024-01-24  3:13   ` syzbot
  2 siblings, 1 reply; 7+ messages in thread
From: Edward Adam Davis @ 2024-01-24  1:45 UTC (permalink / raw)
  To: syzbot+ab18fa9c959320611727; +Cc: linux-kernel, syzkaller-bugs

please test WARNING in dbAdjTree

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 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,


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [syzbot] [jfs?] WARNING in dbAdjTree
  2024-01-24  1:45 ` Edward Adam Davis
@ 2024-01-24  3:13   ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-01-24  3:13 UTC (permalink / raw)
  To: eadavis, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+ab18fa9c959320611727@syzkaller.appspotmail.com

Tested on:

commit:         615d3006 Merge tag 'trace-v6.8-rc1' of git://git.kerne..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=1455ed8be80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d4460091fe9fceda
dashboard link: https://syzkaller.appspot.com/bug?extid=ab18fa9c959320611727
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=171ad715e80000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-24  3:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18  7:38 [syzbot] [jfs?] WARNING in dbAdjTree syzbot
2024-01-24  1:38 ` Edward Adam Davis
2024-01-24  1:38   ` syzbot
2024-01-24  1:43 ` Edward Adam Davis
2024-01-24  1:43   ` syzbot
2024-01-24  1:45 ` Edward Adam Davis
2024-01-24  3:13   ` syzbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.