Warning: Permanently added '10.128.0.14' (ECDSA) to the list of known hosts. [ 40.463584] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 40.579232] audit: type=1400 audit(1567561377.214:36): avc: denied { map } for pid=6897 comm="syz-executor877" path="/root/syz-executor877316875" dev="sda1" ino=16484 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 40.582038] [ 40.608080] ====================================================== [ 40.614401] WARNING: possible circular locking dependency detected [ 40.620702] 4.14.141 #37 Not tainted [ 40.624397] ------------------------------------------------------ [ 40.630739] syz-executor877/6897 is trying to acquire lock: [ 40.636443] (&bdev->bd_mutex){+.+.}, at: [] blkdev_reread_part+0x1f/0x40 [ 40.644924] [ 40.644924] but task is already holding lock: [ 40.651825] (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x134/0xae0 [ 40.659868] [ 40.659868] which lock already depends on the new lock. [ 40.659868] [ 40.668194] [ 40.668194] the existing dependency chain (in reverse order) is: [ 40.675817] [ 40.675817] -> #2 (&nbd->config_lock){+.+.}: [ 40.681688] lock_acquire+0x16f/0x430 [ 40.685994] __mutex_lock+0xe8/0x1470 [ 40.690298] mutex_lock_nested+0x16/0x20 [ 40.694863] nbd_open+0xf2/0x1f0 [ 40.698723] __blkdev_get+0x2c7/0x1120 [ 40.703104] blkdev_get+0xa8/0x8e0 [ 40.707145] blkdev_open+0x1d1/0x260 [ 40.711353] do_dentry_open+0x73b/0xeb0 [ 40.715849] vfs_open+0x105/0x220 [ 40.719796] path_openat+0x8bd/0x3f70 [ 40.724091] do_filp_open+0x18e/0x250 [ 40.728386] do_sys_open+0x2c5/0x430 [ 40.732816] SyS_open+0x2d/0x40 [ 40.736601] do_syscall_64+0x1e8/0x640 [ 40.740985] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 40.746666] [ 40.746666] -> #1 (nbd_index_mutex){+.+.}: [ 40.752360] lock_acquire+0x16f/0x430 [ 40.756684] __mutex_lock+0xe8/0x1470 [ 40.760989] mutex_lock_nested+0x16/0x20 [ 40.765545] nbd_open+0x27/0x1f0 [ 40.769416] __blkdev_get+0x2c7/0x1120 [ 40.773809] blkdev_get+0xa8/0x8e0 [ 40.777876] blkdev_open+0x1d1/0x260 [ 40.782091] do_dentry_open+0x73b/0xeb0 [ 40.786702] vfs_open+0x105/0x220 [ 40.790655] path_openat+0x8bd/0x3f70 [ 40.794960] do_filp_open+0x18e/0x250 [ 40.800300] do_sys_open+0x2c5/0x430 [ 40.804514] SyS_open+0x2d/0x40 [ 40.808292] do_syscall_64+0x1e8/0x640 [ 40.812681] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 40.818379] [ 40.818379] -> #0 (&bdev->bd_mutex){+.+.}: [ 40.824073] __lock_acquire+0x2cb3/0x4620 [ 40.828716] lock_acquire+0x16f/0x430 [ 40.833011] __mutex_lock+0xe8/0x1470 [ 40.837329] mutex_lock_nested+0x16/0x20 [ 40.841896] blkdev_reread_part+0x1f/0x40 [ 40.846538] nbd_ioctl+0x806/0xae0 [ 40.850587] blkdev_ioctl+0x96b/0x1860 [ 40.854987] block_ioctl+0xde/0x120 [ 40.859120] do_vfs_ioctl+0x7ae/0x1060 [ 40.863501] SyS_ioctl+0x8f/0xc0 [ 40.867363] do_syscall_64+0x1e8/0x640 [ 40.871749] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 40.877440] [ 40.877440] other info that might help us debug this: [ 40.877440] [ 40.885552] Chain exists of: [ 40.885552] &bdev->bd_mutex --> nbd_index_mutex --> &nbd->config_lock [ 40.885552] [ 40.896634] Possible unsafe locking scenario: [ 40.896634] [ 40.902664] CPU0 CPU1 [ 40.907304] ---- ---- [ 40.911943] lock(&nbd->config_lock); [ 40.915822] lock(nbd_index_mutex); [ 40.922025] lock(&nbd->config_lock); [ 40.928410] lock(&bdev->bd_mutex); [ 40.932099] [ 40.932099] *** DEADLOCK *** [ 40.932099] [ 40.938130] 1 lock held by syz-executor877/6897: [ 40.942856] #0: (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x134/0xae0 [ 40.951325] [ 40.951325] stack backtrace: [ 40.955797] CPU: 0 PID: 6897 Comm: syz-executor877 Not tainted 4.14.141 #37 [ 40.962867] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 40.972294] Call Trace: [ 40.974867] dump_stack+0x138/0x197 [ 40.978471] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 40.983810] __lock_acquire+0x2cb3/0x4620 [ 40.987944] ? is_bpf_text_address+0xa6/0x120 [ 40.992513] ? kernel_text_address+0x73/0xf0 [ 40.996910] ? trace_hardirqs_on+0x10/0x10 [ 41.001131] lock_acquire+0x16f/0x430 [ 41.004906] ? blkdev_reread_part+0x1f/0x40 [ 41.009291] ? blkdev_reread_part+0x1f/0x40 [ 41.013596] __mutex_lock+0xe8/0x1470 [ 41.017386] ? blkdev_reread_part+0x1f/0x40 [ 41.021683] ? save_trace+0x290/0x290 [ 41.025458] ? blkdev_reread_part+0x1f/0x40 [ 41.029764] ? mutex_trylock+0x1c0/0x1c0 [ 41.033809] ? bd_set_size+0x89/0xb0 [ 41.037508] ? lock_downgrade+0x6e0/0x6e0 [ 41.041632] mutex_lock_nested+0x16/0x20 [ 41.045671] ? mutex_lock_nested+0x16/0x20 [ 41.049888] blkdev_reread_part+0x1f/0x40 [ 41.054010] nbd_ioctl+0x806/0xae0 [ 41.057524] ? kasan_slab_free+0x75/0xc0 [ 41.061560] ? nbd_add_socket+0x5e0/0x5e0 [ 41.065692] ? debug_check_no_obj_freed+0x2aa/0x7b7 [ 41.070681] ? nbd_add_socket+0x5e0/0x5e0 [ 41.074912] blkdev_ioctl+0x96b/0x1860 [ 41.078778] ? blkpg_ioctl+0x980/0x980 [ 41.082675] ? __might_sleep+0x93/0xb0 [ 41.086536] block_ioctl+0xde/0x120 [ 41.090160] ? blkdev_fallocate+0x3b0/0x3b0 [ 41.094455] do_vfs_ioctl+0x7ae/0x1060 [ 41.098317] ? selinux_file_mprotect+0x5d0/0x5d0 [ 41.103055] ? ioctl_preallocate+0x1c0/0x1c0 [ 41.107435] ? putname+0xe0/0x120 [ 41.110861] ? do_sys_open+0x221/0x430 [ 41.114729] ? security_file_ioctl+0x7d/0xb0 [ 41.119111] ? security_file_ioctl+0x89/0xb0 [ 41.123497] SyS_ioctl+0x8f/0xc0 [ 41.126838] ? do_vfs_ioctl+0x1060/0x1060 [ 41.130960] do_syscall_64+0x1e8/0x640 [ 41.134831] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.139651] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.144819] RIP: 0033:0x443df9 [ 41.147983] RSP: 002b:00007fff4ff07d18 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 41.156630] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443df9 [ 41.163881] RDX: 0000000000000000 RSI: 000000000000ab04 RDI: 0000000000000003 [ 41.171128] RBP: 00000000006ce018 R08: 0000000000000000 R09: 00000000004002e0 [ 41.178472] R10: 000000000000000f R11: