batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ====================================================== WARNING: possible circular locking dependency detected 4.19.125-syzkaller #0 Not tainted ------------------------------------------------------ kworker/0:4/7626 is trying to acquire lock: 00000000a0cc8e78 (&sb->s_type->i_mutex_key#9){+.+.}, at: inode_lock include/linux/fs.h:748 [inline] 00000000a0cc8e78 (&sb->s_type->i_mutex_key#9){+.+.}, at: __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:987 but task is already holding lock: 0000000084ce7153 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x7c1/0x1580 kernel/workqueue.c:2130 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((work_completion)(&dio->complete_work)){+.+.}: worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #1 ((wq_completion)"dio/%s"sb->s_id){+.+.}: drain_workqueue+0x1a7/0x460 kernel/workqueue.c:2828 destroy_workqueue+0x75/0x6f0 kernel/workqueue.c:4172 sb_init_dio_done_wq+0x72/0x90 fs/direct-io.c:634 do_blockdev_direct_IO fs/direct-io.c:1284 [inline] __blockdev_direct_IO+0x6445/0xfe24 fs/direct-io.c:1418 ext4_direct_IO_write fs/ext4/inode.c:3769 [inline] ext4_direct_IO+0xa8b/0x1ab0 fs/ext4/inode.c:3902 generic_file_direct_write+0x207/0x490 mm/filemap.c:3065 __generic_file_write_iter+0x2d4/0x610 mm/filemap.c:3244 ext4_file_write_iter+0x2fe/0xf60 fs/ext4/file.c:272 call_write_iter include/linux/fs.h:1821 [inline] aio_write+0x346/0x530 fs/aio.c:1573 __io_submit_one fs/aio.c:1850 [inline] io_submit_one+0x1005/0x20c0 fs/aio.c:1901 __do_sys_io_submit fs/aio.c:1945 [inline] __se_sys_io_submit+0x142/0x4a0 fs/aio.c:1916 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&sb->s_type->i_mutex_key#9){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:987 ext4_sync_file+0xa28/0x1430 fs/ext4/fsync.c:120 vfs_fsync_range+0x138/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2747 [inline] dio_complete+0x47c/0x9e0 fs/direct-io.c:329 process_one_work+0x892/0x1580 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#9 --> (wq_completion)"dio/%s"sb->s_id --> (work_completion)(&dio->complete_work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&dio->complete_work)); lock((wq_completion)"dio/%s"sb->s_id); lock((work_completion)(&dio->complete_work)); lock(&sb->s_type->i_mutex_key#9); *** DEADLOCK *** 2 locks held by kworker/0:4/7626: #0: 000000009ce105b5 ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: process_one_work+0x78b/0x1580 kernel/workqueue.c:2126 #1: 0000000084ce7153 ((work_completion)(&dio->complete_work)){+.+.}, at: process_one_work+0x7c1/0x1580 kernel/workqueue.c:2130 stack backtrace: CPU: 0 PID: 7626 Comm: kworker/0:4 Not tainted 4.19.125-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: dio/sda1 dio_aio_complete_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1865 [inline] check_prevs_add kernel/locking/lockdep.c:1978 [inline] validate_chain kernel/locking/lockdep.c:2419 [inline] __lock_acquire+0x3145/0x4380 kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 down_write+0x34/0x90 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:748 [inline] __generic_file_fsync+0xb0/0x1f0 fs/libfs.c:987 ext4_sync_file+0xa28/0x1430 fs/ext4/fsync.c:120 vfs_fsync_range+0x138/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2747 [inline] dio_complete+0x47c/0x9e0 fs/direct-io.c:329 process_one_work+0x892/0x1580 kernel/workqueue.c:2155 worker_thread+0x96/0xe20 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415