Warning: Permanently added '10.128.1.0' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 533.137464] [ 533.139353] ====================================================== [ 533.145835] WARNING: possible circular locking dependency detected [ 533.152158] 4.19.197-syzkaller #0 Not tainted [ 533.156651] ------------------------------------------------------ [ 533.162983] kworker/1:0/8184 is trying to acquire lock: [ 533.168342] 00000000f790aa52 (&sb->s_type->i_mutex_key#17){+.+.}, at: __generic_file_fsync+0xb0/0x1f0 [ 533.177718] [ 533.177718] but task is already holding lock: [ 533.183688] 000000008ee573ac ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 [ 533.193843] [ 533.193843] which lock already depends on the new lock. [ 533.193843] [ 533.202160] [ 533.202160] the existing dependency chain (in reverse order) is: [ 533.209878] [ 533.209878] -> #2 ((work_completion)(&dio->complete_work)){+.+.}: [ 533.217713] worker_thread+0x64c/0x1130 [ 533.222221] kthread+0x33f/0x460 [ 533.226119] ret_from_fork+0x24/0x30 [ 533.230348] [ 533.230348] -> #1 ((wq_completion)"dio/%s"sb->s_id){+.+.}: [ 533.237477] drain_workqueue+0x1a5/0x460 [ 533.242079] destroy_workqueue+0x75/0x790 [ 533.246769] __alloc_workqueue_key+0xb76/0xed0 [ 533.251879] sb_init_dio_done_wq+0x34/0x90 [ 533.256618] __blockdev_direct_IO+0x5f55/0xef40 [ 533.261795] fat_direct_IO+0x1d1/0x370 [ 533.266189] generic_file_direct_write+0x208/0x4a0 [ 533.271640] __generic_file_write_iter+0x2d0/0x610 [ 533.277168] generic_file_write_iter+0x3f8/0x730 [ 533.282459] aio_write+0x37f/0x5c0 [ 533.286510] io_submit_one+0xecd/0x20c0 [ 533.290998] __se_sys_io_submit+0x11b/0x4a0 [ 533.295837] do_syscall_64+0xf9/0x620 [ 533.300149] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 533.306018] [ 533.306018] -> #0 (&sb->s_type->i_mutex_key#17){+.+.}: [ 533.312769] down_write+0x34/0x90 [ 533.316730] __generic_file_fsync+0xb0/0x1f0 [ 533.321643] fat_file_fsync+0x73/0x200 [ 533.326037] vfs_fsync_range+0x13a/0x220 [ 533.330607] dio_complete+0x763/0xac0 [ 533.335262] process_one_work+0x864/0x1570 [ 533.340023] worker_thread+0x64c/0x1130 [ 533.344511] kthread+0x33f/0x460 [ 533.348387] ret_from_fork+0x24/0x30 [ 533.352610] [ 533.352610] other info that might help us debug this: [ 533.352610] [ 533.360737] Chain exists of: [ 533.360737] &sb->s_type->i_mutex_key#17 --> (wq_completion)"dio/%s"sb->s_id --> (work_completion)(&dio->complete_work) [ 533.360737] [ 533.376357] Possible unsafe locking scenario: [ 533.376357] [ 533.382490] CPU0 CPU1 [ 533.387186] ---- ---- [ 533.391922] lock((work_completion)(&dio->complete_work)); [ 533.397633] lock((wq_completion)"dio/%s"sb->s_id); [ 533.405426] lock((work_completion)(&dio->complete_work)); [ 533.413665] lock(&sb->s_type->i_mutex_key#17); [ 533.418413] [ 533.418413] *** DEADLOCK *** [ 533.418413] [ 533.424639] 2 locks held by kworker/1:0/8184: [ 533.429118] #0: 0000000017e5a9c6 ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: process_one_work+0x767/0x1570 [ 533.439090] #1: 000000008ee573ac ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x79c/0x1570 [ 533.450187] [ 533.450187] stack backtrace: [ 533.454679] CPU: 1 PID: 8184 Comm: kworker/1:0 Not tainted 4.19.197-syzkaller #0 [ 533.462326] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 533.471852] Workqueue: dio/loop2 dio_aio_complete_work [ 533.477150] Call Trace: [ 533.479740] dump_stack+0x1fc/0x2ef [ 533.483365] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 533.489166] __lock_acquire+0x30c9/0x3ff0 [ 533.493305] ? pagevec_lookup_range_tag+0x3b/0x80 [ 533.498139] ? mark_held_locks+0xf0/0xf0 [ 533.502376] ? __filemap_fdatawait_range+0x356/0x510 [ 533.507512] ? wait_on_page_bit+0x3f0/0x3f0 [ 533.512173] ? delete_from_page_cache_batch+0xcc0/0xcc0 [ 533.517549] lock_acquire+0x170/0x3c0 [ 533.521352] ? __generic_file_fsync+0xb0/0x1f0 [ 533.526024] down_write+0x34/0x90 [ 533.529485] ? __generic_file_fsync+0xb0/0x1f0 [ 533.534151] __generic_file_fsync+0xb0/0x1f0 executing program [ 533.538660] fat_file_fsync+0x73/0x200 [ 533.542706] ? fat_trim_fs+0x1030/0x1030 [ 533.546843] vfs_fsync_range+0x13a/0x220 [ 533.550897] dio_complete+0x763/0xac0 [ 533.555110] process_one_work+0x864/0x1570 [ 533.559430] ? pwq_dec_nr_in_flight+0x2d0/0x2d0 [ 533.564093] worker_thread+0x64c/0x1130 [ 533.568146] ? __kthread_parkme+0x133/0x1e0 [ 533.572713] ? process_one_work+0x1570/0x1570 [ 533.577805] kthread+0x33f/0x460 [ 533.581159] ? kthread_park+0x180/0x180 [ 533.585148] ret_from_fork+0x24/0x30 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program