Warning: Permanently added '10.128.0.181' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 82.949087][ T8767] IPVS: ftp: loaded support on port[0] = 21 [ 82.980334][ T8767] [ 82.982693][ T8767] ====================================================== [ 82.989697][ T8767] WARNING: possible circular locking dependency detected [ 82.996702][ T8767] 5.2.0-rc3-next-20190604 #8 Not tainted [ 83.002311][ T8767] ------------------------------------------------------ [ 83.009313][ T8767] syz-executor842/8767 is trying to acquire lock: [ 83.015958][ T8767] 00000000badb3a6d (&mm->mmap_sem#2){++++}, at: get_user_pages_unlocked+0xfc/0x4a0 [ 83.025306][ T8767] [ 83.025306][ T8767] but task is already holding lock: [ 83.032654][ T8767] 0000000052562d44 (&sb->s_type->i_mutex_key#10){+.+.}, at: ext4_file_write_iter+0x246/0x1070 [ 83.042898][ T8767] [ 83.042898][ T8767] which lock already depends on the new lock. [ 83.042898][ T8767] [ 83.053309][ T8767] [ 83.053309][ T8767] the existing dependency chain (in reverse order) is: [ 83.062305][ T8767] [ 83.062305][ T8767] -> #1 (&sb->s_type->i_mutex_key#10){+.+.}: [ 83.070475][ T8767] down_write+0x38/0xa0 [ 83.075179][ T8767] process_measurement+0x15ae/0x15e0 [ 83.080967][ T8767] ima_file_mmap+0x11a/0x130 [ 83.086067][ T8767] security_file_mprotect+0xd5/0x100 [ 83.091882][ T8767] do_mprotect_pkey+0x537/0xa30 [ 83.097242][ T8767] __x64_sys_mprotect+0x78/0xb0 [ 83.102642][ T8767] do_syscall_64+0xfd/0x680 [ 83.107654][ T8767] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.114042][ T8767] [ 83.114042][ T8767] -> #0 (&mm->mmap_sem#2){++++}: [ 83.121160][ T8767] lock_acquire+0x16f/0x3f0 [ 83.126247][ T8767] down_read+0x3f/0x1e0 [ 83.130898][ T8767] get_user_pages_unlocked+0xfc/0x4a0 [ 83.136771][ T8767] get_user_pages_fast+0x43f/0x530 [ 83.142506][ T8767] iov_iter_get_pages+0x2c2/0xf80 [ 83.148045][ T8767] do_blockdev_direct_IO+0x3f7b/0x8e00 [ 83.154017][ T8767] __blockdev_direct_IO+0xa1/0xca [ 83.159540][ T8767] ext4_direct_IO+0xaa7/0x1bb0 [ 83.164823][ T8767] generic_file_direct_write+0x20a/0x4a0 [ 83.170955][ T8767] __generic_file_write_iter+0x2ee/0x630 [ 83.177085][ T8767] ext4_file_write_iter+0x332/0x1070 [ 83.182914][ T8767] new_sync_write+0x4d3/0x770 [ 83.188109][ T8767] __vfs_write+0xe1/0x110 [ 83.192936][ T8767] vfs_write+0x268/0x5d0 [ 83.197676][ T8767] ksys_write+0x14f/0x290 [ 83.202500][ T8767] __x64_sys_write+0x73/0xb0 [ 83.207613][ T8767] do_syscall_64+0xfd/0x680 [ 83.212619][ T8767] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.219001][ T8767] [ 83.219001][ T8767] other info that might help us debug this: [ 83.219001][ T8767] [ 83.229202][ T8767] Possible unsafe locking scenario: [ 83.229202][ T8767] [ 83.236625][ T8767] CPU0 CPU1 [ 83.241971][ T8767] ---- ---- [ 83.247311][ T8767] lock(&sb->s_type->i_mutex_key#10); [ 83.252748][ T8767] lock(&mm->mmap_sem#2); [ 83.259679][ T8767] lock(&sb->s_type->i_mutex_key#10); [ 83.267637][ T8767] lock(&mm->mmap_sem#2); [ 83.272032][ T8767] [ 83.272032][ T8767] *** DEADLOCK *** [ 83.272032][ T8767] [ 83.280184][ T8767] 2 locks held by syz-executor842/8767: [ 83.285737][ T8767] #0: 0000000065e8e19a (sb_writers#3){.+.+}, at: vfs_write+0x485/0x5d0 [ 83.294055][ T8767] #1: 0000000052562d44 (&sb->s_type->i_mutex_key#10){+.+.}, at: ext4_file_write_iter+0x246/0x1070 [ 83.304718][ T8767] [ 83.304718][ T8767] stack backtrace: [ 83.310615][ T8767] CPU: 0 PID: 8767 Comm: syz-executor842 Not tainted 5.2.0-rc3-next-20190604 #8 [ 83.319613][ T8767] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 83.329668][ T8767] Call Trace: [ 83.332966][ T8767] dump_stack+0x172/0x1f0 [ 83.337308][ T8767] print_circular_bug.cold+0x1cc/0x28f [ 83.348463][ T8767] __lock_acquire+0x3755/0x5490 [ 83.353322][ T8767] ? mark_held_locks+0xf0/0xf0 [ 83.358100][ T8767] ? mark_held_locks+0xf0/0xf0 [ 83.362845][ T8767] ? mark_held_locks+0xa4/0xf0 [ 83.367592][ T8767] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 83.373376][ T8767] ? _raw_spin_unlock_irqrestore+0x6b/0xe0 [ 83.379163][ T8767] lock_acquire+0x16f/0x3f0 [ 83.383657][ T8767] ? get_user_pages_unlocked+0xfc/0x4a0 [ 83.389200][ T8767] down_read+0x3f/0x1e0 [ 83.393332][ T8767] ? get_user_pages_unlocked+0xfc/0x4a0 [ 83.398858][ T8767] get_user_pages_unlocked+0xfc/0x4a0 [ 83.404231][ T8767] ? mark_held_locks+0xa4/0xf0 [ 83.408989][ T8767] ? get_user_pages_remote+0x4b0/0x4b0 [ 83.414423][ T8767] ? get_user_pages_fast+0x205/0x530 [ 83.419714][ T8767] ? lockdep_hardirqs_on+0x418/0x5d0 [ 83.424992][ T8767] ? trace_hardirqs_on+0x67/0x220 [ 83.429994][ T8767] get_user_pages_fast+0x43f/0x530 [ 83.435081][ T8767] ? __get_user_pages_fast+0x3e0/0x3e0 [ 83.440551][ T8767] iov_iter_get_pages+0x2c2/0xf80 [ 83.445564][ T8767] ? do_blockdev_direct_IO+0x377/0x8e00 [ 83.451103][ T8767] ? iov_iter_fault_in_readable+0x450/0x450 [ 83.456991][ T8767] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 83.463228][ T8767] ? iov_iter_npages+0x211/0xa80 [ 83.468178][ T8767] do_blockdev_direct_IO+0x3f7b/0x8e00 [ 83.473629][ T8767] ? sb_init_dio_done_wq+0x80/0x80 [ 83.478714][ T8767] ? 0xffffffff81000000 [ 83.482877][ T8767] ? mark_held_locks+0xf0/0xf0 [ 83.498425][ T8767] ? ext4_dio_get_block_unwritten_sync+0xf0/0xf0 [ 83.504760][ T8767] ? lock_downgrade+0x880/0x880 [ 83.509591][ T8767] ? ext4_dio_get_block_unwritten_sync+0xf0/0xf0 [ 83.515896][ T8767] __blockdev_direct_IO+0xa1/0xca [ 83.520935][ T8767] ? __check_block_validity.constprop.0+0x300/0x300 [ 83.527499][ T8767] ext4_direct_IO+0xaa7/0x1bb0 [ 83.532237][ T8767] ? ext4_dio_get_block_unwritten_sync+0xf0/0xf0 [ 83.538557][ T8767] generic_file_direct_write+0x20a/0x4a0 [ 83.544172][ T8767] __generic_file_write_iter+0x2ee/0x630 [ 83.549804][ T8767] ext4_file_write_iter+0x332/0x1070 [ 83.555075][ T8767] ? kasan_check_read+0x11/0x20 [ 83.559909][ T8767] ? ext4_file_mmap+0x410/0x410 [ 83.564739][ T8767] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 83.570956][ T8767] ? iov_iter_init+0xee/0x220 [ 83.575613][ T8767] new_sync_write+0x4d3/0x770 [ 83.580273][ T8767] ? new_sync_read+0x800/0x800 [ 83.585011][ T8767] __vfs_write+0xe1/0x110 [ 83.589316][ T8767] vfs_write+0x268/0x5d0 [ 83.593532][ T8767] ksys_write+0x14f/0x290 [ 83.597837][ T8767] ? __ia32_sys_read+0xb0/0xb0 [ 83.602582][ T8767] ? do_syscall_64+0x26/0x680 [ 83.607235][ T8767] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.613272][ T8767] ? do_syscall_64+0x26/0x680 [ 83.617923][ T8767] __x64_sys_write+0x73/0xb0 [ 83.622489][ T8767] do_syscall_64+0xfd/0x680 [ 83.626968][ T8767] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 83.632830][ T8767] RIP: 0033:0x440a49 [ 83.636704][ T8767] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 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 0f 83 bb 10 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 83.656282][ T8767] RSP: 002b:00007ffc18e28968 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 83.664694][ T8767] RAX: ffffffffffffffda RBX: 00000000004a22e0 RCX: 0000000000440a49 [ 83.672644][ T8767] RDX: 0000000020000012 RSI: 0000000020000000 RDI: 0000000000000005 [ 83.680591][ T8767] RBP: 00000000004a2370 R08: 0000000000000012 R09: 0000000000000100 [ 83.688540][ T8767] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401f90 [ 83.696510][ T8767] R13: 0000000000402020 R14: 0000000000000000 R15: 0000000000000000