[syzbot] kernel BUG in add_to_queue

From: syzbot
Date: Fri Oct 28 2022 - 08:14:10 EST


Hello,

syzbot found the following issue on:

HEAD commit: bbed346d5a96 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=10f68cb6880000
kernel config: https://syzkaller.appspot.com/x/.config?x=3a4a45d2d827c1e
dashboard link: https://syzkaller.appspot.com/bug?extid=8a4b520a9affc6d8ea56
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e8e91bc79312/disk-bbed346d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c1cb3fb3b77e/vmlinux-bbed346d.xz

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

gfs2: fsid=syz:syz.0: G: s:EX n:8/1 f:qb t:EX d:EX/0 a:0 v:0 r:5 m:20 p:0
gfs2: fsid=syz:syz.0: H: s:EX f:cH e:0 p:3072 [syz-executor.5] gfs2_quota_sync+0xf0/0x204 fs/gfs2/quota.c:1322
------------[ cut here ]------------
kernel BUG at fs/gfs2/glock.c:1521!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 3072 Comm: syz-executor.5 Not tainted 6.0.0-rc7-syzkaller-18095-gbbed346d5a96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : add_to_queue+0x5e0/0x710 fs/gfs2/glock.c:1520
lr : add_to_queue+0x5e0/0x710 fs/gfs2/glock.c:1520
sp : ffff80001367ba40
x29: ffff80001367ba50 x28: ffff000131decee0 x27: ffff0000c91a1b00
x26: 0000000000000040 x25: 0000000000000000 x24: 0000000000000000
x23: 0000000000000000 x22: ffff0000c91a1b00 x21: ffff00012b643270
x20: ffff000131decf18 x19: ffff0001172327f8 x18: 00000000000000c0
x17: 205d352e726f7475 x16: ffff80000db49158 x15: ffff0000c73c1a80
x14: 0000000000000000 x13: 00000000ffffffff x12: ffff0000c73c1a80
x11: ff8080000926b160 x10: 0000000000000000 x9 : 8630f0a241885900
x8 : 8630f0a241885900 x7 : ffff80000819545c x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000
Call trace:
add_to_queue+0x5e0/0x710 fs/gfs2/glock.c:1520
gfs2_glock_nq+0x90/0x220 fs/gfs2/glock.c:1546
gfs2_glock_nq_init fs/gfs2/glock.h:263 [inline]
do_sync+0x1dc/0x650 fs/gfs2/quota.c:914
gfs2_quota_sync+0xf0/0x204 fs/gfs2/quota.c:1322
gfs2_sync_fs+0x30/0x78 fs/gfs2/super.c:642
sync_filesystem+0x68/0x134 fs/sync.c:56
generic_shutdown_super+0x38/0x190 fs/super.c:474
kill_block_super+0x30/0x78 fs/super.c:1427
gfs2_kill_sb+0x68/0x78
deactivate_locked_super+0x70/0xe8 fs/super.c:332
deactivate_super+0xd0/0xd4 fs/super.c:363
cleanup_mnt+0x1f8/0x234 fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
task_work_run+0xc4/0x14c kernel/task_work.c:177
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x174/0x1f0 arch/arm64/kernel/signal.c:1127
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x150 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: 52800022 aa1f03e0 aa1303e1 97fff284 (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.