IPVS: Creating netns size=2536 id=1 ====================================================== [ INFO: possible circular locking dependency detected ] 4.9.93-g2ba4887 #2 Not tainted ------------------------------------------------------- syz-executor0/3780 is trying to acquire lock: (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 but task is already holding lock: (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x110/0x140 drivers/block/loop.c:1515 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 __lo_release drivers/block/loop.c:1568 [inline] lo_release+0x85/0x160 drivers/block/loop.c:1591 __blkdev_put+0x636/0x840 fs/block_dev.c:1598 blkdev_put+0x85/0x560 fs/block_dev.c:1663 blkdev_close+0x8b/0xb0 fs/block_dev.c:1670 __fput+0x263/0x700 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x10c/0x180 kernel/task_work.c:116 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0xfc/0x120 arch/x86/entry/common.c:161 prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_swapgs+0x5d/0xdb lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 lo_open+0x1b/0xa0 drivers/block/loop.c:1548 __blkdev_get+0x263/0xd60 fs/block_dev.c:1282 blkdev_get+0x2da/0x920 fs/block_dev.c:1416 blkdev_open+0x1a5/0x250 fs/block_dev.c:1571 do_dentry_open+0x703/0xc80 fs/open.c:766 vfs_open+0x11c/0x210 fs/open.c:879 do_last fs/namei.c:3409 [inline] path_openat+0x758/0x3590 fs/namei.c:3533 do_filp_open+0x197/0x270 fs/namei.c:3567 do_sys_open+0x30d/0x5c0 fs/open.c:1072 SYSC_open fs/open.c:1090 [inline] SyS_open+0x2d/0x40 fs/open.c:1085 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb check_prev_add kernel/locking/lockdep.c:1828 [inline] check_prevs_add kernel/locking/lockdep.c:1938 [inline] validate_chain kernel/locking/lockdep.c:2265 [inline] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345 lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 __mutex_lock_common kernel/locking/mutex.c:521 [inline] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 loop_reread_partitions+0x7c/0x90 drivers/block/loop.c:634 loop_set_status+0x9c7/0xfc0 drivers/block/loop.c:1164 loop_set_status_compat+0x9a/0xf0 drivers/block/loop.c:1488 lo_compat_ioctl+0x11b/0x140 drivers/block/loop.c:1516 compat_blkdev_ioctl+0x3a5/0x3ad0 block/compat_ioctl.c:751 C_SYSC_ioctl fs/compat_ioctl.c:1602 [inline] compat_SyS_ioctl+0x126/0x1fe0 fs/compat_ioctl.c:1549 do_syscall_32_irqs_on arch/x86/entry/common.c:325 [inline] do_fast_syscall_32+0x2f7/0x870 arch/x86/entry/common.c:387 entry_SYSENTER_compat+0x90/0xa2 arch/x86/entry/entry_64_compat.S:137 other info that might help us debug this: Chain exists of: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&lo->lo_ctl_mutex#2); lock(loop_index_mutex); lock(&lo->lo_ctl_mutex#2); lock(&bdev->bd_mutex); *** DEADLOCK *** 1 lock held by syz-executor0/3780: #0: (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x110/0x140 drivers/block/loop.c:1515 stack backtrace: CPU: 0 PID: 3780 Comm: syz-executor0 Not tainted 4.9.93-g2ba4887 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d9617788 ffffffff81d9aa29 ffffffff8538b670 ffffffff853b5970 ffffffff8538aaa0 ffff8801b93250e0 ffff8801b9324800 ffff8801d96177d0 ffffffff8142399d 0000000000000001 00000000b9324800 0000000000000001 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_circular_bug.cold.51+0x1bd/0x27d kernel/locking/lockdep.c:1202 [] check_prev_add kernel/locking/lockdep.c:1828 [inline] [] check_prevs_add kernel/locking/lockdep.c:1938 [inline] [] validate_chain kernel/locking/lockdep.c:2265 [inline] [] __lock_acquire+0x3019/0x4070 kernel/locking/lockdep.c:3345 [] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc0/0x870 kernel/locking/mutex.c:621 [] blkdev_reread_part+0x1e/0x40 block/ioctl.c:189 [] loop_reread_partitions+0x7c/0x90 drivers/block/loop.c:634 [] loop_set_status+0x9c7/0xfc0 drivers/block/loop.c:1164 [] loop_set_status_compat+0x9a/0xf0 drivers/block/loop.c:1488 [] lo_compat_ioctl+0x11b/0x140 drivers/block/loop.c:1516 [] compat_blkdev_ioctl+0x3a5/0x3ad0 block/compat_ioctl.c:751 [] ? security_file_ioct