All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [f2fs?] possible deadlock in super_lock
@ 2023-09-03 22:30 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-03 22:30 UTC (permalink / raw)
  To: chao, jaegeuk, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	syzkaller-bugs, terrelln

Hello,

syzbot found the following issue on:

HEAD commit:    6c1b980a7e79 Merge tag 'dma-mapping-6.6-2023-08-29' of git..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a9669fa80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2212484c18930a61
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6e2281f5cb6b/disk-6c1b980a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5fc2481dcded/vmlinux-6c1b980a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/283bb76567da/bzImage-6c1b980a.xz

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

======================================================
WARNING: possible circular locking dependency detected
6.5.0-syzkaller-04808-g6c1b980a7e79 #0 Not tainted
------------------------------------------------------
syz-executor.4/22893 is trying to acquire lock:
ffff888039b740e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff888039b740e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x23c/0x380 fs/super.c:117

but task is already holding lock:
ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:368 [inline]
ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:500

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       bdev_mark_dead+0x25/0x230 block/bdev.c:961
       disk_force_media_change+0x51/0x80 block/disk-events.c:303
       __loop_clr_fd+0x3ab/0x8f0 drivers/block/loop.c:1174
       lo_release+0x188/0x1c0 drivers/block/loop.c:1743
       blkdev_put_whole+0xa5/0xe0 block/bdev.c:663
       blkdev_put+0x40f/0x8e0 block/bdev.c:898
       kill_block_super+0x58/0x70 fs/super.c:1623
       kill_f2fs_super+0x2b7/0x3d0 fs/f2fs/super.c:4879
       deactivate_locked_super+0x9a/0x170 fs/super.c:481
       deactivate_super+0xde/0x100 fs/super.c:514
       cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
       task_work_run+0x14d/0x240 kernel/task_work.c:179
       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
       exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
       exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
       do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       blkdev_get_by_dev.part.0+0x4f0/0xb20 block/bdev.c:786
       blkdev_get_by_dev+0x75/0x80 block/bdev.c:829
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xbb8/0x64b0 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xcc6/0x3150 fs/reiserfs/super.c:2022
       mount_bdev+0x1f3/0x2e0 fs/super.c:1603
       legacy_get_tree+0x109/0x220 fs/fs_context.c:638
       vfs_get_tree+0x8c/0x370 fs/super.c:1724
       do_new_mount fs/namespace.c:3335 [inline]
       path_mount+0x1492/0x1ed0 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __x64_sys_mount+0x293/0x310 fs/namespace.c:3861
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
       lock_acquire kernel/locking/lockdep.c:5753 [inline]
       lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
       down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x23c/0x380 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1387 [inline]
       fs_bdev_sync+0x94/0x1b0 fs/super.c:1422
       blkdev_flushbuf block/ioctl.c:370 [inline]
       blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:500
       blkdev_ioctl+0x249/0x770 block/ioctl.c:622
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> &disk->open_mutex --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(&disk->open_mutex);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor.4/22893:
 #0: ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:368 [inline]
 #0: ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:500

stack backtrace:
CPU: 1 PID: 22893 Comm: syz-executor.4 Not tainted 6.5.0-syzkaller-04808-g6c1b980a7e79 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
 lock_acquire kernel/locking/lockdep.c:5753 [inline]
 lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
 down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x23c/0x380 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1387 [inline]
 fs_bdev_sync+0x94/0x1b0 fs/super.c:1422
 blkdev_flushbuf block/ioctl.c:370 [inline]
 blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:500
 blkdev_ioctl+0x249/0x770 block/ioctl.c:622
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6f9f67cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6fa03670c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6f9f79bf80 RCX: 00007f6f9f67cae9
RDX: ffffffffffffffff RSI: 0000000000001261 RDI: 0000000000000003
RBP: 00007f6f9f6c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f6f9f79bf80 R15: 00007ffc6e219ec8
 </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.

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

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

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

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

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

* [f2fs-dev] [syzbot] [f2fs?] possible deadlock in super_lock
@ 2023-09-03 22:30 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-03 22:30 UTC (permalink / raw)
  To: chao, jaegeuk, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	syzkaller-bugs, terrelln

Hello,

syzbot found the following issue on:

HEAD commit:    6c1b980a7e79 Merge tag 'dma-mapping-6.6-2023-08-29' of git..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a9669fa80000
kernel config:  https://syzkaller.appspot.com/x/.config?x=2212484c18930a61
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6e2281f5cb6b/disk-6c1b980a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5fc2481dcded/vmlinux-6c1b980a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/283bb76567da/bzImage-6c1b980a.xz

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

======================================================
WARNING: possible circular locking dependency detected
6.5.0-syzkaller-04808-g6c1b980a7e79 #0 Not tainted
------------------------------------------------------
syz-executor.4/22893 is trying to acquire lock:
ffff888039b740e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff888039b740e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x23c/0x380 fs/super.c:117

but task is already holding lock:
ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:368 [inline]
ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:500

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       bdev_mark_dead+0x25/0x230 block/bdev.c:961
       disk_force_media_change+0x51/0x80 block/disk-events.c:303
       __loop_clr_fd+0x3ab/0x8f0 drivers/block/loop.c:1174
       lo_release+0x188/0x1c0 drivers/block/loop.c:1743
       blkdev_put_whole+0xa5/0xe0 block/bdev.c:663
       blkdev_put+0x40f/0x8e0 block/bdev.c:898
       kill_block_super+0x58/0x70 fs/super.c:1623
       kill_f2fs_super+0x2b7/0x3d0 fs/f2fs/super.c:4879
       deactivate_locked_super+0x9a/0x170 fs/super.c:481
       deactivate_super+0xde/0x100 fs/super.c:514
       cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
       task_work_run+0x14d/0x240 kernel/task_work.c:179
       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
       exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
       exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
       do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       blkdev_get_by_dev.part.0+0x4f0/0xb20 block/bdev.c:786
       blkdev_get_by_dev+0x75/0x80 block/bdev.c:829
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xbb8/0x64b0 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xcc6/0x3150 fs/reiserfs/super.c:2022
       mount_bdev+0x1f3/0x2e0 fs/super.c:1603
       legacy_get_tree+0x109/0x220 fs/fs_context.c:638
       vfs_get_tree+0x8c/0x370 fs/super.c:1724
       do_new_mount fs/namespace.c:3335 [inline]
       path_mount+0x1492/0x1ed0 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __x64_sys_mount+0x293/0x310 fs/namespace.c:3861
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
       lock_acquire kernel/locking/lockdep.c:5753 [inline]
       lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
       down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x23c/0x380 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1387 [inline]
       fs_bdev_sync+0x94/0x1b0 fs/super.c:1422
       blkdev_flushbuf block/ioctl.c:370 [inline]
       blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:500
       blkdev_ioctl+0x249/0x770 block/ioctl.c:622
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> &disk->open_mutex --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(&disk->open_mutex);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor.4/22893:
 #0: ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:368 [inline]
 #0: ffff88801e60ba88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:500

stack backtrace:
CPU: 1 PID: 22893 Comm: syz-executor.4 Not tainted 6.5.0-syzkaller-04808-g6c1b980a7e79 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
 lock_acquire kernel/locking/lockdep.c:5753 [inline]
 lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
 down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x23c/0x380 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1387 [inline]
 fs_bdev_sync+0x94/0x1b0 fs/super.c:1422
 blkdev_flushbuf block/ioctl.c:370 [inline]
 blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:500
 blkdev_ioctl+0x249/0x770 block/ioctl.c:622
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6f9f67cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6fa03670c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6f9f79bf80 RCX: 00007f6f9f67cae9
RDX: ffffffffffffffff RSI: 0000000000001261 RDI: 0000000000000003
RBP: 00007f6f9f6c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f6f9f79bf80 R15: 00007ffc6e219ec8
 </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.

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

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

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

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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-09-03 22:30 ` [f2fs-dev] " syzbot
@ 2023-09-20  9:13   ` syzbot
  -1 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-20  9:13 UTC (permalink / raw)
  To: chao, jaegeuk, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	reiserfs-devel, syzkaller-bugs, terrelln

syzbot has found a reproducer for the following issue on:

HEAD commit:    2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12780282680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=107e9518680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f48f4ed701b8/disk-2cf0f715.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5b8491e29a2d/vmlinux-2cf0f715.xz
kernel image: https://storage.googleapis.com/syzbot-assets/90faa04d6558/bzImage-2cf0f715.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/c98194587df7/mount_0.gz

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

======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0 Not tainted
------------------------------------------------------
syz-executor.0/8792 is trying to acquire lock:
ffff88807993a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff88807993a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x23c/0x380 fs/super.c:117

but task is already holding lock:
ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       bdev_mark_dead+0x25/0x230 block/bdev.c:961
       disk_force_media_change+0x51/0x80 block/disk-events.c:303
       __loop_clr_fd+0x3ab/0x8f0 drivers/block/loop.c:1174
       lo_release+0x188/0x1c0 drivers/block/loop.c:1743
       blkdev_put_whole+0xa5/0xe0 block/bdev.c:663
       blkdev_put+0x40f/0x8e0 block/bdev.c:898
       kill_block_super+0x58/0x70 fs/super.c:1649
       deactivate_locked_super+0x9a/0x170 fs/super.c:481
       deactivate_super+0xde/0x100 fs/super.c:514
       cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
       task_work_run+0x14d/0x240 kernel/task_work.c:179
       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
       exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
       exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
       do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       blkdev_get_by_dev.part.0+0x4f0/0xb20 block/bdev.c:786
       blkdev_get_by_dev+0x75/0x80 block/bdev.c:829
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xbb8/0x64b0 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xcc6/0x3150 fs/reiserfs/super.c:2022
       mount_bdev+0x1f3/0x2e0 fs/super.c:1629
       legacy_get_tree+0x109/0x220 fs/fs_context.c:638
       vfs_get_tree+0x8c/0x370 fs/super.c:1750
       do_new_mount fs/namespace.c:3335 [inline]
       path_mount+0x1492/0x1ed0 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __x64_sys_mount+0x293/0x310 fs/namespace.c:3861
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
       lock_acquire kernel/locking/lockdep.c:5753 [inline]
       lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
       down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x23c/0x380 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1431 [inline]
       fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
       blkdev_flushbuf block/ioctl.c:372 [inline]
       blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
       blkdev_ioctl+0x249/0x770 block/ioctl.c:624
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> &disk->open_mutex --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(&disk->open_mutex);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor.0/8792:
 #0: ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

stack backtrace:
CPU: 0 PID: 8792 Comm: syz-executor.0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
 lock_acquire kernel/locking/lockdep.c:5753 [inline]
 lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
 down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x23c/0x380 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
 blkdev_ioctl+0x249/0x770 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f18ae67cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f18af4830c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f18ae79bf80 RCX: 00007f18ae67cae9
RDX: 0000000000000003 RSI: 0000000000001261 RDI: 0000000000000003
RBP: 00007f18ae6c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f18ae79bf80 R15: 00007ffc4185a478
 </TASK>


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

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-09-20  9:13   ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-20  9:13 UTC (permalink / raw)
  To: chao, jaegeuk, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	reiserfs-devel, syzkaller-bugs, terrelln

syzbot has found a reproducer for the following issue on:

HEAD commit:    2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12780282680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=107e9518680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f48f4ed701b8/disk-2cf0f715.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5b8491e29a2d/vmlinux-2cf0f715.xz
kernel image: https://storage.googleapis.com/syzbot-assets/90faa04d6558/bzImage-2cf0f715.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/c98194587df7/mount_0.gz

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

======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0 Not tainted
------------------------------------------------------
syz-executor.0/8792 is trying to acquire lock:
ffff88807993a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff88807993a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x23c/0x380 fs/super.c:117

but task is already holding lock:
ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       bdev_mark_dead+0x25/0x230 block/bdev.c:961
       disk_force_media_change+0x51/0x80 block/disk-events.c:303
       __loop_clr_fd+0x3ab/0x8f0 drivers/block/loop.c:1174
       lo_release+0x188/0x1c0 drivers/block/loop.c:1743
       blkdev_put_whole+0xa5/0xe0 block/bdev.c:663
       blkdev_put+0x40f/0x8e0 block/bdev.c:898
       kill_block_super+0x58/0x70 fs/super.c:1649
       deactivate_locked_super+0x9a/0x170 fs/super.c:481
       deactivate_super+0xde/0x100 fs/super.c:514
       cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
       task_work_run+0x14d/0x240 kernel/task_work.c:179
       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
       exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
       exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
       do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       blkdev_get_by_dev.part.0+0x4f0/0xb20 block/bdev.c:786
       blkdev_get_by_dev+0x75/0x80 block/bdev.c:829
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xbb8/0x64b0 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xcc6/0x3150 fs/reiserfs/super.c:2022
       mount_bdev+0x1f3/0x2e0 fs/super.c:1629
       legacy_get_tree+0x109/0x220 fs/fs_context.c:638
       vfs_get_tree+0x8c/0x370 fs/super.c:1750
       do_new_mount fs/namespace.c:3335 [inline]
       path_mount+0x1492/0x1ed0 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __x64_sys_mount+0x293/0x310 fs/namespace.c:3861
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
       lock_acquire kernel/locking/lockdep.c:5753 [inline]
       lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
       down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x23c/0x380 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1431 [inline]
       fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
       blkdev_flushbuf block/ioctl.c:372 [inline]
       blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
       blkdev_ioctl+0x249/0x770 block/ioctl.c:624
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> &disk->open_mutex --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(&disk->open_mutex);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor.0/8792:
 #0: ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff888148439388 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

stack backtrace:
CPU: 0 PID: 8792 Comm: syz-executor.0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
 lock_acquire kernel/locking/lockdep.c:5753 [inline]
 lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
 down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x23c/0x380 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
 blkdev_ioctl+0x249/0x770 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f18ae67cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f18af4830c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f18ae79bf80 RCX: 00007f18ae67cae9
RDX: 0000000000000003 RSI: 0000000000001261 RDI: 0000000000000003
RBP: 00007f18ae6c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f18ae79bf80 R15: 00007ffc4185a478
 </TASK>


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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-09-03 22:30 ` [f2fs-dev] " syzbot
@ 2023-10-08 15:14   ` syzbot
  -1 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-08 15:14 UTC (permalink / raw)
  To: chao, hdanton, jaegeuk, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, reiserfs-devel, syzkaller-bugs, terrelln

syzbot has found a reproducer for the following issue on:

HEAD commit:    19af4a4ed414 Merge branch 'for-next/core', remote-tracking..
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=1627a911680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=80eedef55cd21fa4
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13deb1c9680000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1006a759680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/702d996331e0/disk-19af4a4e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2a48ce0aeb32/vmlinux-19af4a4e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/332eb4a803d2/Image-19af4a4e.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/97d89134ed25/mount_2.gz

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

======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Not tainted
------------------------------------------------------
syz-executor254/6025 is trying to acquire lock:
ffff0000db54a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff0000db54a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x160/0x328 fs/super.c:117

but task is already holding lock:
ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       bd_finish_claiming+0x218/0x3dc block/bdev.c:566
       blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
       setup_bdev_super+0x68/0x51c fs/super.c:1484
       mount_bdev+0x1a0/0x2b4 fs/super.c:1626
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       init_mount+0xe4/0x144 fs/init.c:25
       do_mount_root+0x104/0x3e4 init/do_mounts.c:166
       mount_root_generic+0x1f0/0x594 init/do_mounts.c:205
       mount_block_root+0x6c/0x7c init/do_mounts.c:378
       mount_root+0xb4/0xe4 init/do_mounts.c:405
       prepare_namespace+0xdc/0x11c init/do_mounts.c:489
       kernel_init_freeable+0x35c/0x474 init/main.c:1560
       kernel_init+0x24/0x29c init/main.c:1437
       ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857

-> #2 (bdev_lock
){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       bd_finish_claiming+0x84/0x3dc block/bdev.c:557
       blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
       setup_bdev_super+0x68/0x51c fs/super.c:1484
       mount_bdev+0x1a0/0x2b4 fs/super.c:1626
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       init_mount+0xe4/0x144 fs/init.c:25
       do_mount_root+0x104/0x3e4 init/do_mounts.c:166
       mount_root_generic+0x1f0/0x594 init/do_mounts.c:205
       mount_block_root+0x6c/0x7c init/do_mounts.c:378
       mount_root+0xb4/0xe4 init/do_mounts.c:405
       prepare_namespace+0xdc/0x11c init/do_mounts.c:489
       kernel_init_freeable+0x35c/0x474 init/main.c:1560
       kernel_init+0x24/0x29c init/main.c:1437
       ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xa60/0x1e44 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xd50/0x2028 fs/reiserfs/super.c:2022
       mount_bdev+0x1e8/0x2b4 fs/super.c:1629
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3861
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
       lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
       down_read+0x58/0x2fc kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x160/0x328 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1431 [inline]
       fs_bdev_sync+0xa4/0x168 fs/super.c:1466
       blkdev_flushbuf block/ioctl.c:372 [inline]
       blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
       blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> bdev_lock --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(bdev_lock);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor254/6025:
 #0: ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502

stack backtrace:
CPU: 0 PID: 6025 Comm: syz-executor254 Not tainted 6.6.0-rc4-syzkaller-g19af4a4ed414 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233
 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
 dump_stack+0x1c/0x28 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2060
 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
 down_read+0x58/0x2fc kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x160/0x328 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0xa4/0x168 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
 blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595


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

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-10-08 15:14   ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-08 15:14 UTC (permalink / raw)
  To: chao, hdanton, jaegeuk, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, reiserfs-devel, syzkaller-bugs, terrelln

syzbot has found a reproducer for the following issue on:

HEAD commit:    19af4a4ed414 Merge branch 'for-next/core', remote-tracking..
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=1627a911680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=80eedef55cd21fa4
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=13deb1c9680000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1006a759680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/702d996331e0/disk-19af4a4e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2a48ce0aeb32/vmlinux-19af4a4e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/332eb4a803d2/Image-19af4a4e.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/97d89134ed25/mount_2.gz

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

======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc4-syzkaller-g19af4a4ed414 #0 Not tainted
------------------------------------------------------
syz-executor254/6025 is trying to acquire lock:
ffff0000db54a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff0000db54a0e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x160/0x328 fs/super.c:117

but task is already holding lock:
ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       bd_finish_claiming+0x218/0x3dc block/bdev.c:566
       blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
       setup_bdev_super+0x68/0x51c fs/super.c:1484
       mount_bdev+0x1a0/0x2b4 fs/super.c:1626
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       init_mount+0xe4/0x144 fs/init.c:25
       do_mount_root+0x104/0x3e4 init/do_mounts.c:166
       mount_root_generic+0x1f0/0x594 init/do_mounts.c:205
       mount_block_root+0x6c/0x7c init/do_mounts.c:378
       mount_root+0xb4/0xe4 init/do_mounts.c:405
       prepare_namespace+0xdc/0x11c init/do_mounts.c:489
       kernel_init_freeable+0x35c/0x474 init/main.c:1560
       kernel_init+0x24/0x29c init/main.c:1437
       ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857

-> #2 (bdev_lock
){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       bd_finish_claiming+0x84/0x3dc block/bdev.c:557
       blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
       setup_bdev_super+0x68/0x51c fs/super.c:1484
       mount_bdev+0x1a0/0x2b4 fs/super.c:1626
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       init_mount+0xe4/0x144 fs/init.c:25
       do_mount_root+0x104/0x3e4 init/do_mounts.c:166
       mount_root_generic+0x1f0/0x594 init/do_mounts.c:205
       mount_block_root+0x6c/0x7c init/do_mounts.c:378
       mount_root+0xb4/0xe4 init/do_mounts.c:405
       prepare_namespace+0xdc/0x11c init/do_mounts.c:489
       kernel_init_freeable+0x35c/0x474 init/main.c:1560
       kernel_init+0x24/0x29c init/main.c:1437
       ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
       blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
       journal_init_dev fs/reiserfs/journal.c:2626 [inline]
       journal_init+0xa60/0x1e44 fs/reiserfs/journal.c:2786
       reiserfs_fill_super+0xd50/0x2028 fs/reiserfs/super.c:2022
       mount_bdev+0x1e8/0x2b4 fs/super.c:1629
       get_super_block+0x44/0x58 fs/reiserfs/super.c:2601
       legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
       vfs_get_tree+0x90/0x288 fs/super.c:1750
       do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
       path_mount+0x590/0xe04 fs/namespace.c:3662
       do_mount fs/namespace.c:3675 [inline]
       __do_sys_mount fs/namespace.c:3884 [inline]
       __se_sys_mount fs/namespace.c:3861 [inline]
       __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3861
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
       lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
       down_read+0x58/0x2fc kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x160/0x328 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1431 [inline]
       fs_bdev_sync+0xa4/0x168 fs/super.c:1466
       blkdev_flushbuf block/ioctl.c:372 [inline]
       blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
       blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
       __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
       invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
       el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
       do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
       el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
       el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
       el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> bdev_lock --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(bdev_lock);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor254/6025:
 #0: ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff0000c1540c88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502

stack backtrace:
CPU: 0 PID: 6025 Comm: syz-executor254 Not tainted 6.6.0-rc4-syzkaller-g19af4a4ed414 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
 dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233
 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106
 dump_stack+0x1c/0x28 lib/dump_stack.c:113
 print_circular_bug+0x150/0x1b8 kernel/locking/lockdep.c:2060
 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x3370/0x75e8 kernel/locking/lockdep.c:5136
 lock_acquire+0x23c/0x71c kernel/locking/lockdep.c:5753
 down_read+0x58/0x2fc kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x160/0x328 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0xa4/0x168 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
 blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595


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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-09-03 22:30 ` [f2fs-dev] " syzbot
@ 2023-10-09  2:05   ` syzbot
  -1 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-09  2:05 UTC (permalink / raw)
  To: axboe, brauner, chao, daniel.vetter, hdanton, jack, jaegeuk,
	jinpu.wang, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	mairacanal, mcanal, reiserfs-devel, syzkaller-bugs, terrelln,
	willy, yukuai3

syzbot has bisected this issue to:

commit 7908632f2927b65f7486ae6b67c24071666ba43f
Author: Maíra Canal <mcanal@igalia.com>
Date:   Thu Sep 14 10:19:02 2023 +0000

    Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17fc0565680000
start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=14020565680000
console output: https://syzkaller.appspot.com/x/log.txt?x=10020565680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000

Reported-by: syzbot+062317ea1d0a6d5e29e7@syzkaller.appspotmail.com
Fixes: 7908632f2927 ("Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-10-09  2:05   ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-09  2:05 UTC (permalink / raw)
  To: axboe, brauner, chao, daniel.vetter, hdanton, jack, jaegeuk,
	jinpu.wang, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	mairacanal, mcanal, reiserfs-devel, syzkaller-bugs, terrelln,
	willy, yukuai3

syzbot has bisected this issue to:

commit 7908632f2927b65f7486ae6b67c24071666ba43f
Author: Maíra Canal <mcanal@igalia.com>
Date:   Thu Sep 14 10:19:02 2023 +0000

    Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17fc0565680000
start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=14020565680000
console output: https://syzkaller.appspot.com/x/log.txt?x=10020565680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000

Reported-by: syzbot+062317ea1d0a6d5e29e7@syzkaller.appspotmail.com
Fixes: 7908632f2927 ("Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-10-09  2:05   ` [f2fs-dev] " syzbot
@ 2023-10-09 12:37     ` Christian Brauner
  -1 siblings, 0 replies; 25+ messages in thread
From: Christian Brauner @ 2023-10-09 12:37 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, chao, daniel.vetter, hdanton, jack, jaegeuk, jinpu.wang,
	linux-f2fs-devel, linux-fsdevel, linux-kernel, mairacanal,
	mcanal, reiserfs-devel, syzkaller-bugs, terrelln, willy, yukuai3

On Sun, Oct 08, 2023 at 07:05:32PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit 7908632f2927b65f7486ae6b67c24071666ba43f
> Author: Maíra Canal <mcanal@igalia.com>
> Date:   Thu Sep 14 10:19:02 2023 +0000
> 
>     Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17fc0565680000
> start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> git tree:       upstream
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=14020565680000
> console output: https://syzkaller.appspot.com/x/log.txt?x=10020565680000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> 
> Reported-by: syzbot+062317ea1d0a6d5e29e7@syzkaller.appspotmail.com
> Fixes: 7908632f2927 ("Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

The bisect is obviously bogus. I haven't seend that bug report before
otherwise I would've already fixed this way earlier:

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git b4/vfs-fixes-reiserfs

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-10-09 12:37     ` Christian Brauner
  0 siblings, 0 replies; 25+ messages in thread
From: Christian Brauner @ 2023-10-09 12:37 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, hdanton, mcanal, jack, reiserfs-devel, daniel.vetter,
	syzkaller-bugs, linux-kernel, willy, linux-f2fs-devel,
	mairacanal, terrelln, yukuai3, linux-fsdevel, jaegeuk,
	jinpu.wang

On Sun, Oct 08, 2023 at 07:05:32PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit 7908632f2927b65f7486ae6b67c24071666ba43f
> Author: Maíra Canal <mcanal@igalia.com>
> Date:   Thu Sep 14 10:19:02 2023 +0000
> 
>     Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=17fc0565680000
> start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> git tree:       upstream
> final oops:     https://syzkaller.appspot.com/x/report.txt?x=14020565680000
> console output: https://syzkaller.appspot.com/x/log.txt?x=10020565680000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> 
> Reported-by: syzbot+062317ea1d0a6d5e29e7@syzkaller.appspotmail.com
> Fixes: 7908632f2927 ("Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit"")
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

The bisect is obviously bogus. I haven't seend that bug report before
otherwise I would've already fixed this way earlier:

#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git b4/vfs-fixes-reiserfs


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-10-09 12:37     ` [f2fs-dev] " Christian Brauner
@ 2023-10-09 14:19       ` syzbot
  -1 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-09 14:19 UTC (permalink / raw)
  To: axboe, brauner, chao, daniel.vetter, hdanton, jack, jaegeuk,
	jinpu.wang, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	mairacanal, mcanal, reiserfs-devel, syzkaller-bugs, terrelln,
	willy, yukuai3

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: task hung in blkdev_put

INFO: task syz-executor.1:6676 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:0     pid:6676  ppid:6383   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_put+0xec/0x740 block/bdev.c:884
 blkdev_release+0x84/0x9c block/fops.c:604
 __fput+0x324/0x7f8 fs/file_table.c:384
 __fput_sync+0x60/0x9c fs/file_table.c:465
 __do_sys_close fs/open.c:1572 [inline]
 __se_sys_close fs/open.c:1557 [inline]
 __arm64_sys_close+0x150/0x1e0 fs/open.c:1557
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.2:6678 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:0     pid:6678  ppid:6377   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_put+0xec/0x740 block/bdev.c:884
 blkdev_release+0x84/0x9c block/fops.c:604
 __fput+0x324/0x7f8 fs/file_table.c:384
 __fput_sync+0x60/0x9c fs/file_table.c:465
 __do_sys_close fs/open.c:1572 [inline]
 __se_sys_close fs/open.c:1557 [inline]
 __arm64_sys_close+0x150/0x1e0 fs/open.c:1557
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.0:6682 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:0     pid:6682  ppid:6389   flags:0x0000000d
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_finish_claiming+0x218/0x3dc block/bdev.c:566
 blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
 journal_init_dev fs/reiserfs/journal.c:2616 [inline]
 journal_init+0xb08/0x1e68 fs/reiserfs/journal.c:2783
 reiserfs_fill_super+0xd58/0x2058 fs/reiserfs/super.c:2029
 mount_bdev+0x1e8/0x2b4 fs/super.c:1629
 get_super_block+0x44/0x58 fs/reiserfs/super.c:2605
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
 vfs_get_tree+0x90/0x288 fs/super.c:1750
 do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
 path_mount+0x590/0xe04 fs/namespace.c:3662
 do_mount fs/namespace.c:3675 [inline]
 __do_sys_mount fs/namespace.c:3884 [inline]
 __se_sys_mount fs/namespace.c:3861 [inline]
 __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3861
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.3:6690 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:0     pid:6690  ppid:6373   flags:0x0000000d
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 super_lock+0x23c/0x328 fs/super.c:134
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0xa4/0x168 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
 blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.3:6695 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:0     pid:6695  ppid:6373   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.5:6696 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:0     pid:6696  ppid:6381   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 blkdev_open+0x128/0x2b0 block/fops.c:589
 do_dentry_open+0x6fc/0x118c fs/open.c:929
 vfs_open+0x7c/0x90 fs/open.c:1063
 do_open fs/namei.c:3639 [inline]
 path_openat+0x1f2c/0x27f8 fs/namei.c:3796
 do_filp_open+0x1bc/0x3cc fs/namei.c:3823
 do_sys_openat2+0x124/0x1b8 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_openat fs/open.c:1453 [inline]
 __se_sys_openat fs/open.c:1448 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.5:6703 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:0     pid:6703  ppid:6381   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.4:6698 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:0     pid:6698  ppid:6384   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 blkdev_open+0x128/0x2b0 block/fops.c:589
 do_dentry_open+0x6fc/0x118c fs/open.c:929
 vfs_open+0x7c/0x90 fs/open.c:1063
 do_open fs/namei.c:3639 [inline]
 path_openat+0x1f2c/0x27f8 fs/namei.c:3796
 do_filp_open+0x1bc/0x3cc fs/namei.c:3823
 do_sys_openat2+0x124/0x1b8 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_openat fs/open.c:1453 [inline]
 __se_sys_openat fs/open.c:1448 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.4:6704 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:0     pid:6704  ppid:6384   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

Showing all locks held in the system:
1 lock held by khungtaskd/30:
 #0: ffff80008e3739c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:302
2 locks held by kworker/u4:6/235:
2 locks held by getty/5770:
 #0: ffff0000d6cf20a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff8000959f02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1214 drivers/tty/n_tty.c:2206
1 lock held by syz-executor.1/6676:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x740 block/bdev.c:884
1 lock held by syz-executor.2/6678:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x740 block/bdev.c:884
3 locks held by syz-executor.0/6682:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 #1: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_finish_claiming+0x84/0x3dc block/bdev.c:557
 #2: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: bd_finish_claiming+0x218/0x3dc block/bdev.c:566
1 lock held by syz-executor.3/6690:
 #0: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502
1 lock held by syz-executor.3/6695:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/6696:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/6703:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/6698:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/6704:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.0/6872:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/6939:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/6940:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.2/6956:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.2/6957:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/6959:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/6960:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.3/6976:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.3/6977:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/6979:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/6980:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.1/6999:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/7000:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.2/7054:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.2/7055:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/7067:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/7068:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.3/7075:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.3/7078:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/7083:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/7084:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508

=============================================



Tested on:

commit:         b6ab1318 reiserfs: fix journal device opening
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git b4/vfs-fixes-reiserfs
console output: https://syzkaller.appspot.com/x/log.txt?x=125bdcde680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1b8c825e0d5f3f72
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Note: no patches were applied.

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-10-09 14:19       ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-09 14:19 UTC (permalink / raw)
  To: axboe, brauner, chao, daniel.vetter, hdanton, jack, jaegeuk,
	jinpu.wang, linux-f2fs-devel, linux-fsdevel, linux-kernel,
	mairacanal, mcanal, reiserfs-devel, syzkaller-bugs, terrelln,
	willy, yukuai3

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
INFO: task hung in blkdev_put

INFO: task syz-executor.1:6676 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:0     pid:6676  ppid:6383   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_put+0xec/0x740 block/bdev.c:884
 blkdev_release+0x84/0x9c block/fops.c:604
 __fput+0x324/0x7f8 fs/file_table.c:384
 __fput_sync+0x60/0x9c fs/file_table.c:465
 __do_sys_close fs/open.c:1572 [inline]
 __se_sys_close fs/open.c:1557 [inline]
 __arm64_sys_close+0x150/0x1e0 fs/open.c:1557
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.2:6678 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:0     pid:6678  ppid:6377   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_put+0xec/0x740 block/bdev.c:884
 blkdev_release+0x84/0x9c block/fops.c:604
 __fput+0x324/0x7f8 fs/file_table.c:384
 __fput_sync+0x60/0x9c fs/file_table.c:465
 __do_sys_close fs/open.c:1572 [inline]
 __se_sys_close fs/open.c:1557 [inline]
 __arm64_sys_close+0x150/0x1e0 fs/open.c:1557
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.0:6682 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:0     pid:6682  ppid:6389   flags:0x0000000d
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_finish_claiming+0x218/0x3dc block/bdev.c:566
 blkdev_get_by_dev+0x3f4/0x55c block/bdev.c:799
 journal_init_dev fs/reiserfs/journal.c:2616 [inline]
 journal_init+0xb08/0x1e68 fs/reiserfs/journal.c:2783
 reiserfs_fill_super+0xd58/0x2058 fs/reiserfs/super.c:2029
 mount_bdev+0x1e8/0x2b4 fs/super.c:1629
 get_super_block+0x44/0x58 fs/reiserfs/super.c:2605
 legacy_get_tree+0xd4/0x16c fs/fs_context.c:638
 vfs_get_tree+0x90/0x288 fs/super.c:1750
 do_new_mount+0x25c/0x8c8 fs/namespace.c:3335
 path_mount+0x590/0xe04 fs/namespace.c:3662
 do_mount fs/namespace.c:3675 [inline]
 __do_sys_mount fs/namespace.c:3884 [inline]
 __se_sys_mount fs/namespace.c:3861 [inline]
 __arm64_sys_mount+0x45c/0x594 fs/namespace.c:3861
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.3:6690 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:0     pid:6690  ppid:6373   flags:0x0000000d
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 super_lock+0x23c/0x328 fs/super.c:134
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0xa4/0x168 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x848/0x2884 block/ioctl.c:502
 blkdev_ioctl+0x35c/0xae4 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.3:6695 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:0     pid:6695  ppid:6373   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.5:6696 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:0     pid:6696  ppid:6381   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 blkdev_open+0x128/0x2b0 block/fops.c:589
 do_dentry_open+0x6fc/0x118c fs/open.c:929
 vfs_open+0x7c/0x90 fs/open.c:1063
 do_open fs/namei.c:3639 [inline]
 path_openat+0x1f2c/0x27f8 fs/namei.c:3796
 do_filp_open+0x1bc/0x3cc fs/namei.c:3823
 do_sys_openat2+0x124/0x1b8 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_openat fs/open.c:1453 [inline]
 __se_sys_openat fs/open.c:1448 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.5:6703 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:0     pid:6703  ppid:6381   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.4:6698 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:0     pid:6698  ppid:6384   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 blkdev_open+0x128/0x2b0 block/fops.c:589
 do_dentry_open+0x6fc/0x118c fs/open.c:929
 vfs_open+0x7c/0x90 fs/open.c:1063
 do_open fs/namei.c:3639 [inline]
 path_openat+0x1f2c/0x27f8 fs/namei.c:3796
 do_filp_open+0x1bc/0x3cc fs/namei.c:3823
 do_sys_openat2+0x124/0x1b8 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_openat fs/open.c:1453 [inline]
 __se_sys_openat fs/open.c:1448 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1448
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
INFO: task syz-executor.4:6704 blocked for more than 143 seconds.
      Not tainted 6.6.0-rc5-syzkaller-gb6ab131813c2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:0     pid:6704  ppid:6384   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:556
 context_switch kernel/sched/core.c:5382 [inline]
 __schedule+0x1364/0x23b4 kernel/sched/core.c:6695
 schedule+0xc4/0x170 kernel/sched/core.c:6771
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6830
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:799
 bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
 loop_configure+0x15c/0xfd4 drivers/block/loop.c:1018
 lo_ioctl+0xc70/0x1d04
 blkdev_ioctl+0x3e4/0xae4 block/ioctl.c:630
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595

Showing all locks held in the system:
1 lock held by khungtaskd/30:
 #0: ffff80008e3739c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:302
2 locks held by kworker/u4:6/235:
2 locks held by getty/5770:
 #0: ffff0000d6cf20a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff8000959f02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1214 drivers/tty/n_tty.c:2206
1 lock held by syz-executor.1/6676:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x740 block/bdev.c:884
1 lock held by syz-executor.2/6678:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x740 block/bdev.c:884
3 locks held by syz-executor.0/6682:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
 #1: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_finish_claiming+0x84/0x3dc block/bdev.c:557
 #2: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: bd_finish_claiming+0x218/0x3dc block/bdev.c:566
1 lock held by syz-executor.3/6690:
 #0: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff0000c1543a88 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x7fc/0x2884 block/ioctl.c:502
1 lock held by syz-executor.3/6695:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/6696:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/6703:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/6698:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/6704:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.0/6872:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/6939:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/6940:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.2/6956:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.2/6957:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/6959:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/6960:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.3/6976:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.3/6977:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/6979:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/6980:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.1/6999:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.1/7000:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.2/7054:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.2/7055:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.5/7067:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.5/7068:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.3/7075:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.3/7078:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508
1 lock held by syz-executor.4/7083:
 #0: ffff0000c9ce34c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x114/0x55c block/bdev.c:786
1 lock held by syz-executor.4/7084:
 #0: ffff80008e1748a8 (bdev_lock){+.+.}-{3:3}, at: bd_prepare_to_claim+0x1a4/0x49c block/bdev.c:508

=============================================



Tested on:

commit:         b6ab1318 reiserfs: fix journal device opening
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git b4/vfs-fixes-reiserfs
console output: https://syzkaller.appspot.com/x/log.txt?x=125bdcde680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1b8c825e0d5f3f72
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Note: no patches were applied.


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-09-03 22:30 ` [f2fs-dev] " syzbot
@ 2023-12-24 16:40   ` syzbot
  -1 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-12-24 16:40 UTC (permalink / raw)
  To: axboe, brauner, chao, christian, daniel.vetter, hch, hdanton,
	jack, jaegeuk, jinpu.wang, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, mairacanal, mcanal, reiserfs-devel, syzkaller-bugs,
	terrelln, willy, yukuai3

syzbot suspects this issue was fixed by commit:

commit fd1464105cb37a3b50a72c1d2902e97a71950af8
Author: Jan Kara <jack@suse.cz>
Date:   Wed Oct 18 15:29:24 2023 +0000

    fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

For information about bisection process see: https://goo.gl/tpsmEJ#bisection


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-12-24 16:40   ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-12-24 16:40 UTC (permalink / raw)
  To: axboe, brauner, chao, christian, daniel.vetter, hch, hdanton,
	jack, jaegeuk, jinpu.wang, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, mairacanal, mcanal, reiserfs-devel, syzkaller-bugs,
	terrelln, willy, yukuai3

syzbot suspects this issue was fixed by commit:

commit fd1464105cb37a3b50a72c1d2902e97a71950af8
Author: Jan Kara <jack@suse.cz>
Date:   Wed Oct 18 15:29:24 2023 +0000

    fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-12-24 16:40   ` syzbot
@ 2023-12-28 10:50     ` Christian Brauner
  -1 siblings, 0 replies; 25+ messages in thread
From: Christian Brauner @ 2023-12-28 10:50 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, hdanton, mcanal, jack, reiserfs-devel, daniel.vetter,
	syzkaller-bugs, linux-kernel, willy, linux-f2fs-devel,
	mairacanal, terrelln, yukuai3, linux-fsdevel, jaegeuk,
	jinpu.wang, hch, christian

On Sun, Dec 24, 2023 at 08:40:05AM -0800, syzbot wrote:
> syzbot suspects this issue was fixed by commit:
> 
> commit fd1464105cb37a3b50a72c1d2902e97a71950af8
> Author: Jan Kara <jack@suse.cz>
> Date:   Wed Oct 18 15:29:24 2023 +0000
> 
>     fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
> start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> 
> If the result looks correct, please mark the issue as fixed by replying with:
> 
> #syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Fwiw, this was always a false-positive. But we also reworked the locking
that even the false-positive cannot be triggered anymore. So yay!


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2023-12-28 10:50     ` Christian Brauner
  0 siblings, 0 replies; 25+ messages in thread
From: Christian Brauner @ 2023-12-28 10:50 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, chao, christian, daniel.vetter, hch, hdanton, jack,
	jaegeuk, jinpu.wang, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, mairacanal, mcanal, reiserfs-devel, syzkaller-bugs,
	terrelln, willy, yukuai3

On Sun, Dec 24, 2023 at 08:40:05AM -0800, syzbot wrote:
> syzbot suspects this issue was fixed by commit:
> 
> commit fd1464105cb37a3b50a72c1d2902e97a71950af8
> Author: Jan Kara <jack@suse.cz>
> Date:   Wed Oct 18 15:29:24 2023 +0000
> 
>     fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> 
> bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
> start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> 
> If the result looks correct, please mark the issue as fixed by replying with:
> 
> #syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> 
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Fwiw, this was always a false-positive. But we also reworked the locking
that even the false-positive cannot be triggered anymore. So yay!

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

* Re: [f2fs-dev] [syzbot] [reiserfs?] possible deadlock in super_lock
  2023-12-28 10:50     ` Christian Brauner
@ 2024-01-02 12:14       ` Jan Kara
  -1 siblings, 0 replies; 25+ messages in thread
From: Jan Kara @ 2024-01-02 12:14 UTC (permalink / raw)
  To: syzbot
  Cc: axboe, Christian Brauner, mcanal, jack, reiserfs-devel,
	daniel.vetter, linux-kernel, hdanton, willy, linux-f2fs-devel,
	syzkaller-bugs, mairacanal, terrelln, yukuai3, linux-fsdevel,
	jaegeuk, jinpu.wang, hch, christian

On Thu 28-12-23 11:50:32, Christian Brauner wrote:
> On Sun, Dec 24, 2023 at 08:40:05AM -0800, syzbot wrote:
> > syzbot suspects this issue was fixed by commit:
> > 
> > commit fd1464105cb37a3b50a72c1d2902e97a71950af8
> > Author: Jan Kara <jack@suse.cz>
> > Date:   Wed Oct 18 15:29:24 2023 +0000
> > 
> >     fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> > 
> > bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
> > start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> > git tree:       upstream
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> > dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> > 
> > If the result looks correct, please mark the issue as fixed by replying with:
> > 
> > #syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> > 
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 
> Fwiw, this was always a false-positive. But we also reworked the locking
> that even the false-positive cannot be triggered anymore. So yay!

Yup, nice. I think you need to start the line with syz command so:

#syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
@ 2024-01-02 12:14       ` Jan Kara
  0 siblings, 0 replies; 25+ messages in thread
From: Jan Kara @ 2024-01-02 12:14 UTC (permalink / raw)
  To: syzbot
  Cc: Christian Brauner, axboe, chao, christian, daniel.vetter, hch,
	hdanton, jack, jaegeuk, jinpu.wang, linux-f2fs-devel,
	linux-fsdevel, linux-kernel, mairacanal, mcanal, reiserfs-devel,
	syzkaller-bugs, terrelln, willy, yukuai3

On Thu 28-12-23 11:50:32, Christian Brauner wrote:
> On Sun, Dec 24, 2023 at 08:40:05AM -0800, syzbot wrote:
> > syzbot suspects this issue was fixed by commit:
> > 
> > commit fd1464105cb37a3b50a72c1d2902e97a71950af8
> > Author: Jan Kara <jack@suse.cz>
> > Date:   Wed Oct 18 15:29:24 2023 +0000
> > 
> >     fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> > 
> > bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14639595e80000
> > start commit:   2cf0f7156238 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
> > git tree:       upstream
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
> > dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
> > syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=107e9518680000
> > 
> > If the result looks correct, please mark the issue as fixed by replying with:
> > 
> > #syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock
> > 
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> 
> Fwiw, this was always a false-positive. But we also reworked the locking
> that even the false-positive cannot be triggered anymore. So yay!

Yup, nice. I think you need to start the line with syz command so:

#syz fix: fs: Avoid grabbing sb->s_umount under bdev->bd_holder_lock

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20231010111343.2257-1-hdanton@sina.com>
@ 2023-10-10 11:49 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-10 11:49 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

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

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

Tested on:

commit:         94f6f055 Linux 6.6-rc5
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=159efc7e680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1b8c825e0d5f3f72
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch:          https://syzkaller.appspot.com/x/patch.diff?x=15784cde680000

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

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20231009112906.2143-1-hdanton@sina.com>
@ 2023-10-09 14:01 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-10-09 14:01 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in fs_bdev_sync

------------[ cut here ]------------
WARNING: CPU: 0 PID: 6681 at fs/super.c:1464 fs_bdev_sync+0x138/0x168 fs/super.c:1464
Modules linked in:
CPU: 0 PID: 6681 Comm: syz-executor.4 Not tainted 6.6.0-rc5-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : fs_bdev_sync+0x138/0x168 fs/super.c:1464
lr : fs_bdev_sync+0x138/0x168 fs/super.c:1464
sp : ffff800097637a70
x29: ffff800097637a70 x28: ffff0000d6699bc0 x27: 0000000000000003
x26: dfff800000000000 x25: ffff700012ec6f58 x24: ffff800097637ac0
x23: 0000000000001261 x22: dfff800000000000 x21: 0000000000000001
x20: 0000000000000000 x19: ffff0000c657c000 x18: 0000000000000000
x17: 0000000000000000 x16: ffff80008031d534 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000000 x12: 00000000c0101282
x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
x8 : ffff0000d6699bc0 x7 : 0000000000000000 x6 : 000000000000003f
x5 : 0000000000000040 x4 : ffffffffffffffff x3 : 0000000000000000
x2 : 0000000000000015 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 fs_bdev_sync+0x138/0x168 fs/super.c:1464
 blkdev_flushbuf block/ioctl.c:371 [inline]
 blkdev_common_ioctl+0x838/0x286c block/ioctl.c:500
 blkdev_ioctl+0x35c/0xae4 block/ioctl.c:622
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:857
 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155
 el0_svc+0x58/0x16c arch/arm64/kernel/entry-common.c:678
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595
irq event stamp: 116
hardirqs last  enabled at (115): [<ffff8000809cd760>] kasan_quarantine_put+0x1a0/0x1c8 mm/kasan/quarantine.c:240
hardirqs last disabled at (116): [<ffff80008a630728>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:436
softirqs last  enabled at (92): [<ffff800080033cf4>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (90): [<ffff800080033cc0>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---


Tested on:

commit:         94f6f055 Linux 6.6-rc5
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=129ec4e9680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1b8c825e0d5f3f72
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
patch:          https://syzkaller.appspot.com/x/patch.diff?x=156813ee680000


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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20230923040320.1384-1-hdanton@sina.com>
@ 2023-09-23  4:26 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-23  4:26 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

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

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

Tested on:

commit:         2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=15916ee4680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=16a02f0e680000

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

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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20230923024635.1249-1-hdanton@sina.com>
@ 2023-09-23  3:02 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-23  3:02 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in dquot_disable

------------[ cut here ]------------
WARNING: CPU: 0 PID: 5401 at fs/quota/dquot.c:2217 dquot_disable+0xff1/0x1710 fs/quota/dquot.c:2217
Modules linked in:
CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
RIP: 0010:dquot_disable+0xff1/0x1710 fs/quota/dquot.c:2217
Code: d2 0f 85 fd 04 00 00 8b 15 48 34 c1 0c 48 c7 c6 ff ff ff ff 48 c7 c7 a0 f4 34 92 e8 19 41 46 02 e9 6f f7 ff ff e8 4f 43 7a ff <0f> 0b 48 89 ef e8 25 95 59 ff e9 a6 f0 ff ff e8 3b 43 7a ff 4c 8d
RSP: 0018:ffffc9000382fb60 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff8880287c0140 RSI: ffffffff820c8201 RDI: 0000000000000005
RBP: ffff888077efc070 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888077efc000 R14: ffffffff8aa27800 R15: 1ffff92000705f79
FS:  0000555555e27480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb752142378 CR3: 00000000212c7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 reiserfs_quota_off+0x11f/0x160 fs/reiserfs/super.c:2480
 reiserfs_quota_off_umount fs/reiserfs/super.c:581 [inline]
 reiserfs_put_super+0x8f/0x5c0 fs/reiserfs/super.c:594
 generic_shutdown_super+0x2ab/0x400 fs/super.c:727
 kill_block_super+0x3b/0x70 fs/super.c:1650
 deactivate_locked_super+0x9a/0x170 fs/super.c:481
 deactivate_super+0xde/0x100 fs/super.c:514
 cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
 task_work_run+0x14d/0x240 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7effb087de17
Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffc59c8ec28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007effb087de17
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffc59c8ece0
RBP: 00007ffc59c8ece0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffc59c8fda0
R13: 00007effb08c73b9 R14: 000000000001d8a7 R15: 0000000000000005
 </TASK>


Tested on:

commit:         2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17d0480a680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=11959f5c680000


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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20230923010437.297-1-hdanton@sina.com>
@ 2023-09-23  1:14 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-23  1:14 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

fs/super.c:663:9: error: 'put' undeclared (first use in this function); did you mean 'fput'?


Tested on:

commit:         2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=14cc0642680000


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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20230922124125.240-1-hdanton@sina.com>
@ 2023-09-22 13:11 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-22 13:11 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

: Allocated hash algorithm: sha256
[   27.035992][    T1] ima: No architecture policies found
[   27.042240][    T1] evm: Initialising EVM extended attributes:
[   27.048580][    T1] evm: security.selinux
[   27.052744][    T1] evm: security.SMACK64 (disabled)
[   27.058061][    T1] evm: security.SMACK64EXEC (disabled)
[   27.063553][    T1] evm: security.SMACK64TRANSMUTE (disabled)
[   27.069527][    T1] evm: security.SMACK64MMAP (disabled)
[   27.075116][    T1] evm: security.apparmor (disabled)
[   27.080399][    T1] evm: security.ima
[   27.084710][    T1] evm: security.capability
[   27.090479][    T1] evm: HMAC attrs: 0x1
[   27.097685][    T1] PM:   Magic number: 7:13:29
[   27.103531][    T1] tty ttydc: hash matches
[   27.108483][    T1] memory memory69: hash matches
[   27.115959][    T1] printk: console [netcon0] enabled
[   27.121787][    T1] netconsole: network logging started
[   27.128754][    T1] gtp: GTP module loaded (pdp ctx size 104 bytes)
[   27.137889][    T1] rdma_rxe: loaded
[   27.142619][    T1] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   27.155065][    T1] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   27.165314][    T1] clk: Disabling unused clocks
[   27.165914][  T921] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   27.170274][    T1] ALSA device list:
[   27.180256][  T921] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[   27.184543][    T1]   #0: Dummy 1
[   27.184558][    T1]   #1: Loopback 1
[   27.184570][    T1]   #2: Virtual MIDI Card 1
[   27.212250][    T1] md: Waiting for all devices to be available before autodetect
[   27.220507][    T1] md: If you don't use raid, use raid=noautodetect
[   27.227162][    T1] md: Autodetecting RAID arrays.
[   27.232319][    T1] md: autorun ...
[   27.236020][    T1] md: ... autorun DONE.
[   27.282766][    T1] 
[   27.285112][    T1] =====================================
[   27.290728][    T1] WARNING: bad unlock balance detected!
[   27.296371][    T1] 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0 Not tainted
[   27.304445][    T1] -------------------------------------
[   27.310421][    T1] swapper/0/1 is trying to release lock (&type->s_umount_key) at:
[   27.318241][    T1] [<ffffffff81eb7734>] generic_shutdown_super+0x1e4/0x3c0
[   27.325454][    T1] but there are no more locks to release!
[   27.331175][    T1] 
[   27.331175][    T1] other info that might help us debug this:
[   27.339755][    T1] no locks held by swapper/0/1.
[   27.344702][    T1] 
[   27.344702][    T1] stack backtrace:
[   27.351193][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
[   27.361550][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
[   27.371784][    T1] Call Trace:
[   27.375057][    T1]  <TASK>
[   27.377991][    T1]  dump_stack_lvl+0xd9/0x1b0
[   27.382775][    T1]  lock_release+0x4b5/0x680
[   27.387307][    T1]  ? generic_shutdown_super+0x1e4/0x3c0
[   27.393046][    T1]  ? reacquire_held_locks+0x4b0/0x4b0
[   27.399133][    T1]  ? reacquire_held_locks+0x4b0/0x4b0
[   27.404517][    T1]  ? __wake_up_sync+0x20/0x20
[   27.409379][    T1]  up_write+0x2a/0x510
[   27.413447][    T1]  ? reiserfs_remount+0x1640/0x1640
[   27.418761][    T1]  generic_shutdown_super+0x1e4/0x3c0
[   27.424293][    T1]  ? reiserfs_remount+0x1640/0x1640
[   27.429818][    T1]  kill_block_super+0x3b/0x70
[   27.434502][    T1]  deactivate_locked_super+0xa6/0x180
[   27.439882][    T1]  mount_bdev+0x2a6/0x300
[   27.444306][    T1]  ? sget+0x610/0x610
[   27.448361][    T1]  ? vfs_parse_fs_param+0x3c0/0x3c0
[   27.453617][    T1]  ? cap_capable+0x1d8/0x240
[   27.458237][    T1]  ? reiserfs_kill_sb+0x1e0/0x1e0
[   27.463792][    T1]  legacy_get_tree+0x109/0x220
[   27.468671][    T1]  vfs_get_tree+0x8c/0x370
[   27.473205][    T1]  path_mount+0x1492/0x1ed0
[   27.477749][    T1]  ? kmem_cache_free+0x223/0x380
[   27.482713][    T1]  ? finish_automount+0xa40/0xa40
[   27.487868][    T1]  ? putname+0x101/0x140
[   27.492574][    T1]  init_mount+0xbf/0x110
[   27.497105][    T1]  ? nsfs_init+0xb0/0xb0
[   27.501361][    T1]  do_mount_root+0xdd/0x2c0
[   27.506048][    T1]  mount_root_generic+0x19a/0x460
[   27.511083][    T1]  ? init_rootfs+0x60/0x60
[   27.515515][    T1]  ? getname_kernel+0x21c/0x360
[   27.520369][    T1]  mount_root+0x241/0x480
[   27.524697][    T1]  ? kmem_cache_alloc+0x338/0x400
[   27.529717][    T1]  ? mount_root_generic+0x460/0x460
[   27.535001][    T1]  ? getname_kernel+0x21c/0x360
[   27.539945][    T1]  prepare_namespace+0xe3/0x3f0
[   27.544896][    T1]  ? mount_root+0x480/0x480
[   27.549494][    T1]  ? fput+0x30/0x1a0
[   27.553394][    T1]  kernel_init_freeable+0x703/0x8f0
[   27.558596][    T1]  ? rest_init+0x2b0/0x2b0
[   27.563016][    T1]  kernel_init+0x1c/0x2a0
[   27.567351][    T1]  ? rest_init+0x2b0/0x2b0
[   27.571769][    T1]  ret_from_fork+0x45/0x80
[   27.576365][    T1]  ? rest_init+0x2b0/0x2b0
[   27.580799][    T1]  ret_from_fork_asm+0x11/0x20
[   27.585674][    T1]  </TASK>
[   27.588872][    T1] ------------[ cut here ]------------
[   27.594557][    T1] DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE)): count = 0x0, magic = 0xffff88814be20070, owner = 0x0, curr 0xffff888019644040, list empty
[   27.613588][    T1] WARNING: CPU: 0 PID: 1 at kernel/locking/rwsem.c:1369 up_write+0x458/0x510
[   27.622528][    T1] Modules linked in:
[   27.626442][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
[   27.637061][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
[   27.648689][    T1] RIP: 0010:up_write+0x458/0x510
[   27.653883][    T1] Code: c1 ea 03 80 3c 02 00 75 50 48 8b 13 4d 89 f1 41 55 4d 89 f8 4c 89 e1 48 c7 c6 e0 93 8c 8a 48 c7 c7 00 93 8c 8a e8 e8 e1 e6 ff <0f> 0b 5a e9 aa fc ff ff 48 89 ef e8 28 9f 75 00 e9 17 fd ff ff 48
[   27.674317][    T1] RSP: 0000:ffffc9000027f910 EFLAGS: 00010286
[   27.680635][    T1] RAX: 0000000000000000 RBX: ffff88814be20070 RCX: 0000000000000000
[   27.688711][    T1] RDX: ffff888019644040 RSI: ffffffff814cf096 RDI: 0000000000000001
[   27.696725][    T1] RBP: ffff88814be20078 R08: 0000000000000001 R09: 0000000000000000
[   27.704906][    T1] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88814be20070
[   27.713404][    T1] R13: ffffffff8a8c9240 R14: ffff888019644040 R15: 0000000000000000
[   27.721412][    T1] FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
[   27.730905][    T1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   27.737626][    T1] CR2: ffff88823ffff000 CR3: 000000000c976000 CR4: 00000000003506f0
[   27.746689][    T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   27.754948][    T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   27.762933][    T1] Call Trace:
[   27.766295][    T1]  <TASK>
[   27.769274][    T1]  ? show_regs+0x8f/0xa0
[   27.773712][    T1]  ? __warn+0xe6/0x380
[   27.777946][    T1]  ? up_write+0x458/0x510
[   27.782348][    T1]  ? report_bug+0x3bc/0x580
[   27.786873][    T1]  ? handle_bug+0x3c/0x70
[   27.791192][    T1]  ? exc_invalid_op+0x17/0x40
[   27.795896][    T1]  ? asm_exc_invalid_op+0x1a/0x20
[   27.800980][    T1]  ? __warn_printk+0x1a6/0x350
[   27.805772][    T1]  ? up_write+0x458/0x510
[   27.810110][    T1]  ? reiserfs_remount+0x1640/0x1640
[   27.815343][    T1]  generic_shutdown_super+0x1e4/0x3c0
[   27.820737][    T1]  ? reiserfs_remount+0x1640/0x1640
[   27.826056][    T1]  kill_block_super+0x3b/0x70
[   27.830828][    T1]  deactivate_locked_super+0xa6/0x180
[   27.836220][    T1]  mount_bdev+0x2a6/0x300
[   27.840537][    T1]  ? sget+0x610/0x610
[   27.844534][    T1]  ? vfs_parse_fs_param+0x3c0/0x3c0
[   27.849831][    T1]  ? cap_capable+0x1d8/0x240
[   27.854439][    T1]  ? reiserfs_kill_sb+0x1e0/0x1e0
[   27.859490][    T1]  legacy_get_tree+0x109/0x220
[   27.864358][    T1]  vfs_get_tree+0x8c/0x370
[   27.868886][    T1]  path_mount+0x1492/0x1ed0
[   27.873441][    T1]  ? kmem_cache_free+0x223/0x380
[   27.878456][    T1]  ? finish_automount+0xa40/0xa40
[   27.883647][    T1]  ? putname+0x101/0x140
[   27.887917][    T1]  init_mount+0xbf/0x110
[   27.892230][    T1]  ? nsfs_init+0xb0/0xb0
[   27.896498][    T1]  do_mount_root+0xdd/0x2c0
[   27.901004][    T1]  mount_root_generic+0x19a/0x460
[   27.906042][    T1]  ? init_rootfs+0x60/0x60
[   27.910526][    T1]  ? getname_kernel+0x21c/0x360
[   27.915727][    T1]  mount_root+0x241/0x480
[   27.920314][    T1]  ? kmem_cache_alloc+0x338/0x400
[   27.925350][    T1]  ? mount_root_generic+0x460/0x460
[   27.930895][    T1]  ? getname_kernel+0x21c/0x360
[   27.936002][    T1]  prepare_namespace+0xe3/0x3f0
[   27.941118][    T1]  ? mount_root+0x480/0x480
[   27.945751][    T1]  ? fput+0x30/0x1a0
[   27.949754][    T1]  kernel_init_freeable+0x703/0x8f0
[   27.954988][    T1]  ? rest_init+0x2b0/0x2b0
[   27.959460][    T1]  kernel_init+0x1c/0x2a0
[   27.963999][    T1]  ? rest_init+0x2b0/0x2b0
[   27.969519][    T1]  ret_from_fork+0x45/0x80
[   27.974142][    T1]  ? rest_init+0x2b0/0x2b0
[   27.978650][    T1]  ret_from_fork_asm+0x11/0x20
[   27.983604][    T1]  </TASK>
[   27.986619][    T1] Kernel panic - not syncing: kernel: panic_on_warn set ...
[   27.994750][    T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
[   28.005187][    T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
[   28.015864][    T1] Call Trace:
[   28.019651][    T1]  <TASK>
[   28.022839][    T1]  dump_stack_lvl+0xd9/0x1b0
[   28.027529][    T1]  panic+0x6a6/0x750
[   28.032304][    T1]  ? panic_smp_self_stop+0xa0/0xa0
[   28.037525][    T1]  ? up_write+0x458/0x510
[   28.042116][    T1]  check_panic_on_warn+0xab/0xb0
[   28.047062][    T1]  __warn+0xf2/0x380
[   28.050976][    T1]  ? up_write+0x458/0x510
[   28.055569][    T1]  report_bug+0x3bc/0x580
[   28.060442][    T1]  handle_bug+0x3c/0x70
[   28.065044][    T1]  exc_invalid_op+0x17/0x40
[   28.070109][    T1]  asm_exc_invalid_op+0x1a/0x20
[   28.074971][    T1] RIP: 0010:up_write+0x458/0x510
[   28.080204][    T1] Code: c1 ea 03 80 3c 02 00 75 50 48 8b 13 4d 89 f1 41 55 4d 89 f8 4c 89 e1 48 c7 c6 e0 93 8c 8a 48 c7 c7 00 93 8c 8a e8 e8 e1 e6 ff <0f> 0b 5a e9 aa fc ff ff 48 89 ef e8 28 9f 75 00 e9 17 fd ff ff 48
[   28.101200][    T1] RSP: 0000:ffffc9000027f910 EFLAGS: 00010286
[   28.108760][    T1] RAX: 0000000000000000 RBX: ffff88814be20070 RCX: 0000000000000000
[   28.117095][    T1] RDX: ffff888019644040 RSI: ffffffff814cf096 RDI: 0000000000000001
[   28.126618][    T1] RBP: ffff88814be20078 R08: 0000000000000001 R09: 0000000000000000
[   28.135129][    T1] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88814be20070
[   28.143194][    T1] R13: ffffffff8a8c9240 R14: ffff888019644040 R15: 0000000000000000
[   28.151661][    T1]  ? __warn_printk+0x1a6/0x350
[   28.156636][    T1]  ? reiserfs_remount+0x1640/0x1640
[   28.162549][    T1]  generic_shutdown_super+0x1e4/0x3c0
[   28.168079][    T1]  ? reiserfs_remount+0x1640/0x1640
[   28.173469][    T1]  kill_block_super+0x3b/0x70
[   28.178141][    T1]  deactivate_locked_super+0xa6/0x180
[   28.185001][    T1]  mount_bdev+0x2a6/0x300
[   28.189343][    T1]  ? sget+0x610/0x610
[   28.193358][    T1]  ? vfs_parse_fs_param+0x3c0/0x3c0
[   28.198655][    T1]  ? cap_capable+0x1d8/0x240
[   28.203381][    T1]  ? reiserfs_kill_sb+0x1e0/0x1e0
[   28.208422][    T1]  legacy_get_tree+0x109/0x220
[   28.213330][    T1]  vfs_get_tree+0x8c/0x370
[   28.217759][    T1]  path_mount+0x1492/0x1ed0
[   28.222264][    T1]  ? kmem_cache_free+0x223/0x380
[   28.227628][    T1]  ? finish_automount+0xa40/0xa40
[   28.232783][    T1]  ? putname+0x101/0x140
[   28.237039][    T1]  init_mount+0xbf/0x110
[   28.241283][    T1]  ? nsfs_init+0xb0/0xb0
[   28.245522][    T1]  do_mount_root+0xdd/0x2c0
[   28.250046][    T1]  mount_root_generic+0x19a/0x460
[   28.255065][    T1]  ? init_rootfs+0x60/0x60
[   28.259488][    T1]  ? getname_kernel+0x21c/0x360
[   28.264366][    T1]  mount_root+0x241/0x480
[   28.268693][    T1]  ? kmem_cache_alloc+0x338/0x400
[   28.273700][    T1]  ? mount_root_generic+0x460/0x460
[   28.278888][    T1]  ? getname_kernel+0x21c/0x360
[   28.283735][    T1]  prepare_namespace+0xe3/0x3f0
[   28.288575][    T1]  ? mount_root+0x480/0x480
[   28.293225][    T1]  ? fput+0x30/0x1a0
[   28.297134][    T1]  kernel_init_freeable+0x703/0x8f0
[   28.302361][    T1]  ? rest_init+0x2b0/0x2b0
[   28.306831][    T1]  kernel_init+0x1c/0x2a0
[   28.311182][    T1]  ? rest_init+0x2b0/0x2b0
[   28.315698][    T1]  ret_from_fork+0x45/0x80
[   28.320147][    T1]  ? rest_init+0x2b0/0x2b0
[   28.324661][    T1]  ret_from_fork_asm+0x11/0x20
[   28.329423][    T1]  </TASK>
[   28.332714][    T1] Kernel Offset: disabled
[   28.337046][    T1] Rebooting in 86400 seconds..


syzkaller build log:
go env (err=<nil>)
GO111MODULE="auto"
GOARCH="amd64"
GOBIN=""
GOCACHE="/syzkaller/.cache/go-build"
GOENV="/syzkaller/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/syzkaller/jobs-2/linux/gopath/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/syzkaller/jobs-2/linux/gopath"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4053167018=/tmp/go-build -gno-record-gcc-switches"

git status (err=<nil>)
HEAD detached at 0b6a67ac4
nothing to commit, working tree clean


tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Makefile:32: run command via tools/syz-env for best compatibility, see:
Makefile:33: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env
go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen
make .descriptions
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
bin/syz-sysgen
touch .descriptions
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=0b6a67ac4b0dc26f43030c5edd01c9175f13b784 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230913-073137'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-fuzzer github.com/google/syzkaller/syz-fuzzer
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=0b6a67ac4b0dc26f43030c5edd01c9175f13b784 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230913-073137'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog
GOOS=linux GOARCH=amd64 go build "-ldflags=-s -w -X github.com/google/syzkaller/prog.GitRevision=0b6a67ac4b0dc26f43030c5edd01c9175f13b784 -X 'github.com/google/syzkaller/prog.gitRevisionDate=20230913-073137'" "-tags=syz_target syz_os_linux syz_arch_amd64 " -o ./bin/linux_amd64/syz-stress github.com/google/syzkaller/tools/syz-stress
mkdir -p ./bin/linux_amd64
gcc -o ./bin/linux_amd64/syz-executor executor/executor.cc \
	-m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -fpermissive -w -DGOOS_linux=1 -DGOARCH_amd64=1 \
	-DHOSTGOOS_linux=1 -DGIT_REVISION=\"0b6a67ac4b0dc26f43030c5edd01c9175f13b784\"


Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=1688a642680000


Tested on:

commit:         2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=1656035a680000


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

* Re: [syzbot] [reiserfs?] possible deadlock in super_lock
       [not found] <20230921111321.181-1-hdanton@sina.com>
@ 2023-09-21 11:33 ` syzbot
  0 siblings, 0 replies; 25+ messages in thread
From: syzbot @ 2023-09-21 11:33 UTC (permalink / raw)
  To: hdanton, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in super_lock

======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0 Not tainted
------------------------------------------------------
syz-executor.2/5807 is trying to acquire lock:
ffff88802862e0e0 (&type->s_umount_key#25){++++}-{3:3}, at: __super_lock fs/super.c:58 [inline]
ffff88802862e0e0 (&type->s_umount_key#25){++++}-{3:3}, at: super_lock+0x23c/0x380 fs/super.c:117

but task is already holding lock:
ffff8881484c3408 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
ffff8881484c3408 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&bdev->bd_holder_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       bdev_mark_dead+0x25/0x230 block/bdev.c:961
       disk_force_media_change+0x51/0x80 block/disk-events.c:303
       __loop_clr_fd+0x3ab/0x8f0 drivers/block/loop.c:1174
       lo_release+0x188/0x1c0 drivers/block/loop.c:1743
       blkdev_put_whole+0xa5/0xe0 block/bdev.c:663
       blkdev_put+0x40f/0x8e0 block/bdev.c:898
       blkdev_release+0x82/0xa0 block/fops.c:604
       __fput+0x3f7/0xa70 fs/file_table.c:384
       __fput_sync+0x47/0x50 fs/file_table.c:465
       __do_sys_close fs/open.c:1572 [inline]
       __se_sys_close fs/open.c:1557 [inline]
       __x64_sys_close+0x87/0xf0 fs/open.c:1557
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #1 (&disk->open_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x181/0x1340 kernel/locking/mutex.c:747
       blkdev_put+0xb0/0x8e0 block/bdev.c:884
       release_journal_dev fs/reiserfs/journal.c:2599 [inline]
       free_journal_ram+0x49f/0x650 fs/reiserfs/journal.c:1896
       do_journal_release fs/reiserfs/journal.c:1960 [inline]
       journal_release+0x2a4/0x660 fs/reiserfs/journal.c:1971
       reiserfs_put_super+0xe9/0x5c0 fs/reiserfs/super.c:616
       generic_shutdown_super+0x161/0x3c0 fs/super.c:693
       kill_block_super+0x3b/0x70 fs/super.c:1646
       deactivate_locked_super+0x9a/0x170 fs/super.c:481
       deactivate_super+0xde/0x100 fs/super.c:514
       cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
       task_work_run+0x14d/0x240 kernel/task_work.c:179
       resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
       exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
       exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
       __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
       syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
       do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&type->s_umount_key#25){++++}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
       lock_acquire kernel/locking/lockdep.c:5753 [inline]
       lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
       down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
       __super_lock fs/super.c:58 [inline]
       super_lock+0x23c/0x380 fs/super.c:117
       super_lock_shared fs/super.c:146 [inline]
       super_lock_shared_active fs/super.c:1431 [inline]
       fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
       blkdev_flushbuf block/ioctl.c:372 [inline]
       blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
       blkdev_ioctl+0x249/0x770 block/ioctl.c:624
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Chain exists of:
  &type->s_umount_key#25 --> &disk->open_mutex --> &bdev->bd_holder_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&bdev->bd_holder_lock);
                               lock(&disk->open_mutex);
                               lock(&bdev->bd_holder_lock);
  rlock(&type->s_umount_key#25);

 *** DEADLOCK ***

1 lock held by syz-executor.2/5807:
 #0: ffff8881484c3408 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_flushbuf block/ioctl.c:370 [inline]
 #0: ffff8881484c3408 (&bdev->bd_holder_lock){+.+.}-{3:3}, at: blkdev_common_ioctl+0x14e9/0x1ce0 block/ioctl.c:502

stack backtrace:
CPU: 1 PID: 5807 Comm: syz-executor.2 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136
 lock_acquire kernel/locking/lockdep.c:5753 [inline]
 lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718
 down_read+0x9c/0x470 kernel/locking/rwsem.c:1520
 __super_lock fs/super.c:58 [inline]
 super_lock+0x23c/0x380 fs/super.c:117
 super_lock_shared fs/super.c:146 [inline]
 super_lock_shared_active fs/super.c:1431 [inline]
 fs_bdev_sync+0x94/0x1b0 fs/super.c:1466
 blkdev_flushbuf block/ioctl.c:372 [inline]
 blkdev_common_ioctl+0x1550/0x1ce0 block/ioctl.c:502
 blkdev_ioctl+0x249/0x770 block/ioctl.c:624
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fb8e707cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb8e7cf50c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fb8e719bf80 RCX: 00007fb8e707cae9
RDX: 0000000000000003 RSI: 0000000000001261 RDI: 0000000000000003
RBP: 00007fb8e70c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fb8e719bf80 R15: 00007ffd7864fa98
 </TASK>


Tested on:

commit:         2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=13e90bf8680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
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=177cdcf2680000


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

end of thread, other threads:[~2024-01-02 12:15 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-03 22:30 [syzbot] [f2fs?] possible deadlock in super_lock syzbot
2023-09-03 22:30 ` [f2fs-dev] " syzbot
2023-09-20  9:13 ` [syzbot] [reiserfs?] " syzbot
2023-09-20  9:13   ` [f2fs-dev] " syzbot
2023-10-08 15:14 ` syzbot
2023-10-08 15:14   ` [f2fs-dev] " syzbot
2023-10-09  2:05 ` syzbot
2023-10-09  2:05   ` [f2fs-dev] " syzbot
2023-10-09 12:37   ` Christian Brauner
2023-10-09 12:37     ` [f2fs-dev] " Christian Brauner
2023-10-09 14:19     ` syzbot
2023-10-09 14:19       ` [f2fs-dev] " syzbot
2023-12-24 16:40 ` syzbot
2023-12-24 16:40   ` syzbot
2023-12-28 10:50   ` [f2fs-dev] " Christian Brauner
2023-12-28 10:50     ` Christian Brauner
2024-01-02 12:14     ` [f2fs-dev] " Jan Kara
2024-01-02 12:14       ` Jan Kara
     [not found] <20230921111321.181-1-hdanton@sina.com>
2023-09-21 11:33 ` syzbot
     [not found] <20230922124125.240-1-hdanton@sina.com>
2023-09-22 13:11 ` syzbot
     [not found] <20230923010437.297-1-hdanton@sina.com>
2023-09-23  1:14 ` syzbot
     [not found] <20230923024635.1249-1-hdanton@sina.com>
2023-09-23  3:02 ` syzbot
     [not found] <20230923040320.1384-1-hdanton@sina.com>
2023-09-23  4:26 ` syzbot
     [not found] <20231009112906.2143-1-hdanton@sina.com>
2023-10-09 14:01 ` syzbot
     [not found] <20231010111343.2257-1-hdanton@sina.com>
2023-10-10 11:49 ` 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.