IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready ====================================================== IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready WARNING: possible circular locking dependency detected 4.14.287-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/9373 is trying to acquire lock: ("dio/%s"sb->s_id){+.+.}, at: [] flush_workqueue+0xcb/0x1310 kernel/workqueue.c:2622 but task is already holding lock: IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready ( batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 &sb->s_type->i_mutex_key#10){+.+.}, at: [] inode_trylock include/linux/fs.h:739 [inline] &sb->s_type->i_mutex_key#10){+.+.}, at: [] ext4_file_write_iter+0x1cc/0xd20 fs/ext4/file.c:236 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! -> #2 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 (&sb->s_type->i_mutex_key#10){+.+.}: down_write+0x34/0x90 kernel/locking/rwsem.c:54 inode_lock include/linux/fs.h:719 [inline] __generic_file_fsync+0x9e/0x190 fs/libfs.c:989 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! ext4_sync_file+0x8ed/0x12c0 fs/ext4/fsync.c:118 vfs_fsync_range+0x103/0x260 fs/sync.c:196 generic_write_sync include/linux/fs.h:2684 [inline] dio_complete+0x561/0x8d0 fs/direct-io.c:330 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! ((&dio->complete_work)){+.+.}: process_one_work+0x736/0x14a0 kernel/workqueue.c:2093 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #0 ("dio/%s"sb->s_id){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 batman_adv: batadv0: Interface activated: batadv_slave_0 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 device veth0_macvtap entered promiscuous mode destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 sb_init_dio_done_wq+0x61/0x80 fs/direct-io.c:635 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 ext4_direct_IO_write fs/ext4/inode.c:3749 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3890 generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 call_write_iter include/linux/fs.h:1780 [inline] aio_write+0x2ed/0x560 fs/aio.c:1553 io_submit_one fs/aio.c:1641 [inline] do_io_submit+0x847/0x1570 fs/aio.c:1709 IPv6: ADDRCONF(NETDEV_UP): veth0_vlan: link is not ready do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Chain exists of: "dio/%s"sb->s_id --> (&dio->complete_work) IPv6: ADDRCONF(NETDEV_UP): vlan0: link is not ready --> IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready &sb->s_type->i_mutex_key#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock((&dio->complete_work)); lock(&sb->s_type->i_mutex_key#10 IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready ); device veth0_vlan entered promiscuous mode lock( device veth1_vlan entered promiscuous mode "dio/%s"sb->s_id IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready ); IPv6: ADDRCONF(NETDEV_UP): macvlan1: link is not ready *** DEADLOCK *** IPv6: ADDRCONF(NETDEV_UP): veth0_macvtap: link is not ready 2 locks held by syz-executor.4/9373: IPv6: ADDRCONF(NETDEV_UP): veth1_macvtap: link is not ready #0: device veth0_macvtap entered promiscuous mode ( IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready sb_writers device veth1_macvtap entered promiscuous mode #3 IPv6: ADDRCONF(NETDEV_UP): macsec0: link is not ready ){.+.+} IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready , at: [] file_start_write include/linux/fs.h:2714 [inline] , at: [] aio_write+0x408/0x560 fs/aio.c:1552 IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready #1: (&sb->s_type->i_mutex_key#10){+.+.}, at: [] inode_trylock include/linux/fs.h:739 [inline] #1: (&sb->s_type->i_mutex_key#10){+.+.}, at: [] ext4_file_write_iter+0x1cc/0xd20 fs/ext4/file.c:236 stack backtrace: batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 CPU: 1 PID: 9373 Comm: syz-executor.4 Not tainted 4.14.287-syzkaller #0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 sb_init_dio_done_wq+0x61/0x80 fs/direct-io.c:635 batman_adv: batadv0: Interface activated: batadv_slave_0 do_blockdev_direct_IO fs/direct-io.c:1287 [inline] __blockdev_direct_IO+0x3df1/0xdcb0 fs/direct-io.c:1423 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 ext4_direct_IO_write fs/ext4/inode.c:3749 [inline] ext4_direct_IO+0x888/0x1b80 fs/ext4/inode.c:3890 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! generic_file_direct_write+0x1df/0x420 mm/filemap.c:2958 __generic_file_write_iter+0x2a2/0x590 mm/filemap.c:3137 ext4_file_write_iter+0x276/0xd20 fs/ext4/file.c:270 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready call_write_iter include/linux/fs.h:1780 [inline] aio_write+0x2ed/0x560 fs/aio.c:1553 batman_adv: batadv0: Interface activated: batadv_slave_1 io_submit_one fs/aio.c:1641 [inline] do_io_submit+0x847/0x1570 fs/aio.c:1709 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7fbe01f49109 RSP: 002b:00007fbe016be168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007fbe0205bf60 RCX: 00007fbe01f49109 RDX: 0000000020000540 RSI: 0000000000001801 RDI: 00007fbe02037000 RBP: 00007fbe01fa305d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcd3c128cf R14: 00007fbe016be300 R15: 0000000000022000 IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_vlan: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_vlan: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 device veth1_macvtap entered promiscuous mode IPv6: ADDRCONF(NETDEV_CHANGE): vlan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! Bluetooth: hci1 command 0x0419 tx timeout batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 Bluetooth: hci0 command 0x0419 tx timeout Bluetooth: hci2 command 0x0419 tx timeout Bluetooth: hci4 command 0x0419 tx timeout Bluetooth: hci5 command 0x0419 tx timeout Bluetooth: hci3 command 0x0419 tx timeout batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_0 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready 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