random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) IPVS: ftp: loaded support on port[0] = 21 ====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc2+ #43 Not tainted ------------------------------------------------------ syz-executor0/4506 is trying to acquire lock: (ptrval) (&bdev->bd_mutex){+.+.}, at: blkdev_reread_part+0x1e/0x40 block/ioctl.c:192 but task is already holding lock: (ptrval) (&lo->lo_ctl_mutex#2){+.+.}, at: lo_compat_ioctl+0x12a/0x170 drivers/block/loop.c:1580 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&lo->lo_ctl_mutex#2){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16d/0x17f0 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 __lo_release drivers/block/loop.c:1637 [inline] lo_release+0xa3/0x1f0 drivers/block/loop.c:1661 __blkdev_put+0x4f6/0x830 fs/block_dev.c:1790 blkdev_put+0x98/0x540 fs/block_dev.c:1852 blkdev_close+0x8b/0xb0 fs/block_dev.c:1859 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1e4/0x290 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x2bd/0x310 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (loop_index_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16d/0x17f0 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 lo_open+0x1b/0xb0 drivers/block/loop.c:1617 __blkdev_get+0x358/0x13a0 fs/block_dev.c:1476 blkdev_get+0xb9/0xb30 fs/block_dev.c:1611 blkdev_open+0x1fb/0x280 fs/block_dev.c:1769 do_dentry_open+0x7ef/0xf10 fs/open.c:784 vfs_open+0x139/0x230 fs/open.c:906 do_last fs/namei.c:3365 [inline] path_openat+0x1676/0x4e20 fs/namei.c:3501 do_filp_open+0x249/0x350 fs/namei.c:3535 do_sys_open+0x56f/0x740 fs/open.c:1093 __do_sys_open fs/open.c:1111 [inline] __se_sys_open fs/open.c:1106 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1106 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&bdev->bd_mutex){+.+.}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16d/0x17f0 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 blkdev_reread_part+0x1e/0x40 block/ioctl.c:192 loop_reread_partitions+0x159/0x180 drivers/block/loop.c:641 loop_set_status+0xb95/0x1010 drivers/block/loop.c:1187 loop_set_status_compat+0xa4/0xf0 drivers/block/loop.c:1552 lo_compat_ioctl+0x14b/0x170 drivers/block/loop.c:1582 compat_blkdev_ioctl+0x3c2/0x1b20 block/compat_ioctl.c:406 __do_compat_sys_ioctl fs/compat_ioctl.c:1461 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:1407 [inline] __ia32_compat_sys_ioctl+0x221/0x640 fs/compat_ioctl.c:1407 do_syscall_32_irqs_on arch/x86/entry/common.c:323 [inline] do_fast_syscall_32+0x345/0xf9b arch/x86/entry/common.c:394 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 other info that might help us debug this: Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 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/4506: #0: (ptrval) (&lo->lo_ctl_mutex#2){+.+.}, at: lo_compat_ioctl+0x12a/0x170 drivers/block/loop.c:1580 stack backtrace: CPU: 1 PID: 4506 Comm: syz-executor0 Not tainted 4.17.0-rc2+ #43 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x343e/0x5140 kernel/locking/lockdep.c:3431 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16d/0x17f0 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 blkdev_reread_part+0x1e/0x40 block/ioctl.c:192 loop_reread_partitions+0x159/0x180 drivers/block/loop.c:641 loop_set_status+0xb95/0x1010 drivers/block/loop.c:1187 loop_set_status_compat+0xa4/0xf0 drivers/block/loop.c:1552 lo_compat_ioctl+0x14b/0x170 drivers/block/loop.c:1582 compat_blkdev_ioctl+0x3c2/0x1b20 block/compat_ioctl.c:406 __do_compat_sys_ioctl fs/compat_ioctl.c:1461 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:1407 [inline] __ia32_compat_sys_ioctl+0x221/0x640 fs/compat_ioctl.c:1407 do_syscall_32_irqs_on arch/x86/entry/common.c:323 [inline] do_fast_syscall_32+0x345/0xf9b arch/x86/entry/common.c:394 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f26cb9 RSP: 002b:00000000ff88d52c EFLAGS: 00000286 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000003 R