8021q: adding VLAN 0 to HW filter on device team0 8021q: adding VLAN 0 to HW filter on device team0 8021q: adding VLAN 0 to HW filter on device team0 ====================================================== WARNING: possible circular locking dependency detected 4.20.0-rc1-next-20181109+ #110 Not tainted ------------------------------------------------------ syz-executor1/7524 is trying to acquire lock: 000000001e30c193 ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: flush_workqueue+0x2db/0x1e10 kernel/workqueue.c:2652 but task is already holding lock: 00000000c2fb724c (&sb->s_type->i_mutex_key#10){+.+.}, at: inode_trylock include/linux/fs.h:784 [inline] 00000000c2fb724c (&sb->s_type->i_mutex_key#10){+.+.}, at: ext4_file_write_iter+0x2a1/0x1420 fs/ext4/file.c:232 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&sb->s_type->i_mutex_key#10){+.+.}: down_write+0x8a/0x130 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:764 [inline] __generic_file_fsync+0xb5/0x200 fs/libfs.c:999 ext4_sync_file+0xa45/0x1500 fs/ext4/fsync.c:120 vfs_fsync_range+0x140/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2799 [inline] dio_complete+0x75c/0x9e0 fs/direct-io.c:329 dio_aio_complete_work+0x20/0x30 fs/direct-io.c:341 process_one_work+0xc8b/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #1 ((work_completion)(&dio->complete_work)){+.+.}: process_one_work+0xc0a/0x1c40 kernel/workqueue.c:2129 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #0 ((wq_completion)"dio/%s"sb->s_id){+.+.}: lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3844 flush_workqueue+0x30a/0x1e10 kernel/workqueue.c:2655 drain_workqueue+0x2a9/0x640 kernel/workqueue.c:2820 destroy_workqueue+0xc6/0x9c0 kernel/workqueue.c:4155 sb_init_dio_done_wq+0x74/0x90 fs/direct-io.c:634 do_blockdev_direct_IO+0x9e7/0xa340 fs/direct-io.c:1285 __blockdev_direct_IO+0x9d/0xc6 fs/direct-io.c:1419 ext4_direct_IO_write fs/ext4/inode.c:3774 [inline] ext4_direct_IO+0xbdc/0x2220 fs/ext4/inode.c:3901 generic_file_direct_write+0x275/0x4b0 mm/filemap.c:3043 kobject: 'loop5' (00000000dcad9ece): kobject_uevent_env __generic_file_write_iter+0x2ff/0x630 mm/filemap.c:3222 ext4_file_write_iter+0x390/0x1420 fs/ext4/file.c:266 call_write_iter include/linux/fs.h:1867 [inline] aio_write+0x3b1/0x610 fs/aio.c:1562 io_submit_one+0xaa1/0xf80 fs/aio.c:1836 kobject: 'loop5' (00000000dcad9ece): fill_kobj_path: path = '/devices/virtual/block/loop5' __do_sys_io_submit fs/aio.c:1917 [inline] __se_sys_io_submit fs/aio.c:1888 [inline] __x64_sys_io_submit+0x1ab/0x580 fs/aio.c:1888 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: (wq_completion)"dio/%s"sb->s_id --> (work_completion)(&dio->complete_work) --> &sb->s_type->i_mutex_key#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock((work_completion)(&dio->complete_work)); lock(&sb->s_type->i_mutex_key#10); lock((wq_completion)"dio/%s"sb->s_id); *** DEADLOCK *** kobject: 'loop0' (000000006fb6428e): kobject_uevent_env 1 lock held by syz-executor1/7524: #0: 00000000c2fb724c (&sb->s_type->i_mutex_key#10){+.+.}, at: inode_trylock include/linux/fs.h:784 [inline] #0: 00000000c2fb724c (&sb->s_type->i_mutex_key#10){+.+.}, at: ext4_file_write_iter+0x2a1/0x1420 fs/ext4/file.c:232 stack backtrace: CPU: 1 PID: 7524 Comm: syz-executor1 Not tainted 4.20.0-rc1-next-20181109+ #110 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+0x244/0x39d lib/dump_stack.c:113 kobject: 'loop0' (000000006fb6428e): fill_kobj_path: path = '/devices/virtual/block/loop0' print_circular_bug.isra.35.cold.56+0x1bd/0x27d kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2347 [inline] __lock_acquire+0x3399/0x4c20 kernel/locking/lockdep.c:3341 lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3844 flush_workqueue+0x30a/0x1e10 kernel/workqueue.c:2655 drain_workqueue+0x2a9/0x640 kernel/workqueue.c:2820 destroy_workqueue+0xc6/0x9c0 kernel/workqueue.c:4155 sb_init_dio_done_wq+0x74/0x90 fs/direct-io.c:634 do_blockdev_direct_IO+0x9e7/0xa340 fs/direct-io.c:1285 __blockdev_direct_IO+0x9d/0xc6 fs/direct-io.c:1419 ext4_direct_IO_write fs/ext4/inode.c:3774 [inline] ext4_direct_IO+0xbdc/0x2220 fs/ext4/inode.c:3901 generic_file_direct_write+0x275/0x4b0 mm/filemap.c:3043 __generic_file_write_iter+0x2ff/0x630 mm/filemap.c:3222 ext4_file_write_iter+0x390/0x1420 fs/ext4/file.c:266 call_write_iter include/linux/fs.h:1867 [inline] aio_write+0x3b1/0x610 fs/aio.c:1562 io_submit_one+0xaa1/0xf80 fs/aio.c:1836 __do_sys_io_submit fs/aio.c:1917 [inline] __se_sys_io_submit fs/aio.c:1888 [inline] __x64_sys_io_submit+0x1ab/0x580 fs/aio.c:1888 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f043ff6bc78 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000020000540 RSI: 0000000000000008 RDI: 00007f043ff4b000 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f043ff6c6d4 R13: 00000000004be7ed R14: 00000000004ced68 R15: 00000000ffffffff ------------[ cut here ]------------ downgrading a read lock WARNING: CPU: 0 PID: 7528 at kernel/locking/lockdep.c:3556 __lock_downgrade kernel/locking/lockdep.c:3556 [inline] WARNING: CPU: 0 PID: 7528 at kernel/locking/lockdep.c:3556 lock_downgrade+0x4d7/0x900 kernel/locking/lockdep.c:3819