[v6.1] possible deadlock in get_super (2)

0 views
Skip to first unread message

syzbot

unread,
Jul 6, 2026, 2:50:35 AMJul 6
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 090666d3cc90 Linux 6.1.177
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=172e1b39580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cd374bd3b354feae
dashboard link: https://syzkaller.appspot.com/bug?extid=aaa74ada07aa095f3a2b
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/378e2dbb7ed4/disk-090666d3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/48878db70015/vmlinux-090666d3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/31993c027dae/Image-090666d3.gz.xz

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

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.1.913/7922 is trying to acquire lock:
ffff0000d13fc0e0 (&type->s_umount_key#88){++++}-{3:3}, at: get_super+0xf8/0x1e8 fs/super.c:828

but task is already holding lock:
ffff0000cdeeb198 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x11c/0xc30 drivers/block/nbd.c:1543

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&nbd->config_lock){+.+.}-{3:3}:
__mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
refcount_dec_and_mutex_lock+0x40/0xec lib/refcount.c:118
nbd_config_put+0x38/0x6c8 drivers/block/nbd.c:1328
nbd_release+0xe8/0x130 drivers/block/nbd.c:1632
blkdev_put+0x488/0x6b0 block/bdev.c:-1
blkdev_close+0x54/0x94 block/fops.c:514
__fput+0x1b4/0x7b0 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x1f4/0x280 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151
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+0x98/0x128 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
__mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
blkdev_put+0xe8/0x6b0 block/bdev.c:930
release_journal_dev fs/reiserfs/journal.c:2594 [inline]
free_journal_ram+0x314/0x394 fs/reiserfs/journal.c:1896
do_journal_release+0x2f0/0x460 fs/reiserfs/journal.c:1960
journal_release+0x2c/0x40 fs/reiserfs/journal.c:1971
reiserfs_put_super+0x1fc/0x450 fs/reiserfs/super.c:616
generic_shutdown_super+0x138/0x32c fs/super.c:501
kill_block_super+0x78/0xe0 fs/super.c:1470
reiserfs_kill_sb+0x124/0x13c fs/reiserfs/super.c:570
deactivate_locked_super+0xb4/0x128 fs/super.c:332
deactivate_super+0xe4/0x104 fs/super.c:363
cleanup_mnt+0x3a8/0x430 fs/namespace.c:1191
__cleanup_mnt+0x20/0x30 fs/namespace.c:1198
task_work_run+0x1f4/0x280 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151
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+0x98/0x128 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #0 (&type->s_umount_key#88){++++}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063
lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676
down_read+0x64/0x300 kernel/locking/rwsem.c:1520
get_super+0xf8/0x1e8 fs/super.c:828
__invalidate_device+0x28/0x108 block/bdev.c:1022
nbd_clear_sock_ioctl drivers/block/nbd.c:1463 [inline]
__nbd_ioctl drivers/block/nbd.c:1490 [inline]
nbd_ioctl+0x2d8/0xc30 drivers/block/nbd.c:1550
blkdev_ioctl+0x654/0xb74 block/ioctl.c:626
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

other info that might help us debug this:

Chain exists of:
&type->s_umount_key#88 --> &disk->open_mutex --> &nbd->config_lock

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(&nbd->config_lock);
lock(&disk->open_mutex);
lock(&nbd->config_lock);
lock(&type->s_umount_key#88);

*** DEADLOCK ***

1 lock held by syz.1.913/7922:
#0: ffff0000cdeeb198 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x11c/0xc30 drivers/block/nbd.c:1543

stack backtrace:
CPU: 1 PID: 7922 Comm: syz.1.913 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/02/2026
Call trace:
dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048
check_noncircular+0x264/0x2f8 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3095 [inline]
check_prevs_add kernel/locking/lockdep.c:3214 [inline]
validate_chain kernel/locking/lockdep.c:3830 [inline]
__lock_acquire+0x2808/0x6634 kernel/locking/lockdep.c:5063
lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676
down_read+0x64/0x300 kernel/locking/rwsem.c:1520
get_super+0xf8/0x1e8 fs/super.c:828
__invalidate_device+0x28/0x108 block/bdev.c:1022
nbd_clear_sock_ioctl drivers/block/nbd.c:1463 [inline]
__nbd_ioctl drivers/block/nbd.c:1490 [inline]
nbd_ioctl+0x2d8/0xc30 drivers/block/nbd.c:1550
blkdev_ioctl+0x654/0xb74 block/ioctl.c:626
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585


---
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 syzk...@googlegroups.com.

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
Reply all
Reply to author
Forward
0 new messages