[syzbot] [jfs?] kernel BUG in dbBackSplit

From: syzbot
Date: Sun Sep 15 2024 - 13:59:41 EST


Hello,

syzbot found the following issue on:

HEAD commit: df54f4a16f82 Merge branch 'for-next/core' into for-kernelci
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=15f1a200580000
kernel config: https://syzkaller.appspot.com/x/.config?x=dde5a5ba8d41ee9e
dashboard link: https://syzkaller.appspot.com/bug?extid=af0d2605ff1908d60ca9
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/aa2eb06e0aea/disk-df54f4a1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/14728733d385/vmlinux-df54f4a1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/99816271407d/Image-df54f4a1.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+af0d2605ff1908d60ca9@xxxxxxxxxxxxxxxxxxxxxxxxx

read_mapping_page failed!
read_mapping_page failed!
BUG at fs/jfs/jfs_dmap.c:2700 assert(leaf[leafno] == NOFREE)
------------[ cut here ]------------
kernel BUG at fs/jfs/jfs_dmap.c:2700!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 UID: 0 PID: 6540 Comm: syz.0.10 Not tainted 6.11.0-rc5-syzkaller-gdf54f4a16f82 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : dbBackSplit+0x50c/0x510 fs/jfs/jfs_dmap.c:2700
lr : dbBackSplit+0x50c/0x510 fs/jfs/jfs_dmap.c:2700
sp : ffff80009b097910
x29: ffff80009b097940 x28: dfff800000000000 x27: 0000000000000074
x26: 0000000000000000 x25: 1fffe0001a90ac1d x24: 00000000000000ff
x23: 0000000000000006 x22: ffff0000d4856076 x21: 0000000000000055
x20: ffff0000d4856010 x19: ffff0000d48560ea x18: 0000000000000008
x17: 0000000000000000 x16: ffff80008b22c470 x15: ffff700011eb116c
x14: 1ffff00011eb116c x13: 0000000000000004 x12: ffffffffffffffff
x11: 0000000000040000 x10: 000000000003ffff
x9 : 66d0280209d6ee00
x8 : 66d0280209d6ee00 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80009b097078 x4 : ffff80008f5fb200 x3 : ffff800080381c08
x2 : 0000000000000000 x1 : 0000000100000000 x0 : 000000000000003c
Call trace:
dbBackSplit+0x50c/0x510 fs/jfs/jfs_dmap.c:2700
dbFreeDmap fs/jfs/jfs_dmap.c:2108 [inline]
dbFree+0x498/0x5b0 fs/jfs/jfs_dmap.c:409
dbDiscardAG+0x604/0x748 fs/jfs/jfs_dmap.c:1650
jfs_ioc_trim+0x3cc/0x5d8 fs/jfs/jfs_discard.c:100
jfs_ioctl+0x338/0x550 fs/jfs/ioctl.c:131
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:893
__invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598
Code: d004e9a3 91128063 52815182 9592231d (d4210000)
---[ end trace 0000000000000000 ]---


---
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@xxxxxxxxxxxxxxxx.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

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

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