batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_0 ====================================================== WARNING: possible circular locking dependency detected 6.6.0-rc4-next-20231005-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/5102 is trying to acquire lock: ffff888025fd4578 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:518 [inline] ffff888025fd4578 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0x15d0 kernel/sched/core.c:4213 but task is already holding lock: ffffffff8cb98e18 ((console_sem).lock){-...}-{2:2}, at: up+0x16/0xb0 kernel/locking/semaphore.c:187 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 ((console_sem).lock){-...}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 down_trylock+0x12/0x70 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x40/0x140 kernel/printk/printk.c:323 console_trylock+0x73/0x130 kernel/printk/printk.c:2652 console_trylock_spinning kernel/printk/printk.c:1924 [inline] vprintk_emit+0x162/0x5f0 kernel/printk/printk.c:2303 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2329 pick_eevdf kernel/sched/fair.c:963 [inline] pick_next_entity kernel/sched/fair.c:5247 [inline] pick_next_task_fair+0x1c5/0x1280 kernel/sched/fair.c:8205 __pick_next_task kernel/sched/core.c:5986 [inline] pick_next_task kernel/sched/core.c:6061 [inline] __schedule+0x493/0x5a00 kernel/sched/core.c:6640 __schedule_loop kernel/sched/core.c:6753 [inline] schedule+0xe7/0x270 kernel/sched/core.c:6768 worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799 kthread+0x33c/0x440 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 -> #1 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:558 raw_spin_rq_lock kernel/sched/sched.h:1357 [inline] rq_lock kernel/sched/sched.h:1671 [inline] task_fork_fair+0x70/0x240 kernel/sched/fair.c:12399 sched_cgroup_fork+0x3cf/0x510 kernel/sched/core.c:4799 copy_process+0x4580/0x74b0 kernel/fork.c:2609 kernel_clone+0xfd/0x920 kernel/fork.c:2907 user_mode_thread+0xb4/0xf0 kernel/fork.c:2985 rest_init+0x27/0x2b0 init/main.c:691 arch_call_rest_init+0x13/0x30 init/main.c:823 start_kernel+0x39f/0x480 init/main.c:1068 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:556 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:537 secondary_startup_64_no_verify+0x166/0x16b -> #0 (&p->pi_lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:518 [inline] try_to_wake_up+0xb0/0x15d0 kernel/sched/core.c:4213 up+0x79/0xb0 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:340 [inline] __console_unlock kernel/printk/printk.c:2699 [inline] console_unlock+0x1cf/0x260 kernel/printk/printk.c:3031 vprintk_emit+0x17f/0x5f0 kernel/printk/printk.c:2304 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2329 batadv_check_known_mac_addr+0x21f/0x440 net/batman-adv/hard-interface.c:526 batadv_hard_if_event+0x1048/0x1660 net/batman-adv/hard-interface.c:998 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970 call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_set_mac_address+0x36f/0x4a0 net/core/dev.c:8860 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:8874 do_setlink+0x6e9/0x3fa0 net/core/rtnetlink.c:2864 __rtnl_newlink+0xc1d/0x1940 net/core/rtnetlink.c:3707 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x3c4/0xdf0 net/core/rtnetlink.c:6480 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 __sys_sendto+0x255/0x340 net/socket.c:2194 __do_sys_sendto net/socket.c:2206 [inline] __se_sys_sendto net/socket.c:2202 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2202 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: &p->pi_lock --> &rq->__lock --> (console_sem).lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((console_sem).lock); lock(&rq->__lock); lock((console_sem).lock); lock(&p->pi_lock); *** DEADLOCK *** 4 locks held by syz-executor.1/5102: #0: ffffffff8e60db28 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8e60db28 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x36f/0xdf0 net/core/rtnetlink.c:6477 #1: ffffffff8e6001b0 (dev_addr_sem){++++}-{3:3}, at: dev_set_mac_address_user+0x22/0x50 net/core/dev.c:8873 #2: ffffffff8cbab220 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:303 [inline] #2: ffffffff8cbab220 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:749 [inline] #2: ffffffff8cbab220 (rcu_read_lock){....}-{1:2}, at: batadv_check_known_mac_addr+0x38/0x440 net/batman-adv/hard-interface.c:513 #3: ffffffff8cb98e18 ((console_sem).lock){-...}-{2:2}, at: up+0x16/0xb0 kernel/locking/semaphore.c:187 stack backtrace: CPU: 0 PID: 5102 Comm: syz-executor.1 Not tainted 6.6.0-rc4-next-20231005-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 check_noncircular+0x311/0x3f0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x2e3d/0x5de0 kernel/locking/lockdep.c:5136 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:518 [inline] try_to_wake_up+0xb0/0x15d0 kernel/sched/core.c:4213 up+0x79/0xb0 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:340 [inline] __console_unlock kernel/printk/printk.c:2699 [inline] console_unlock+0x1cf/0x260 kernel/printk/printk.c:3031 vprintk_emit+0x17f/0x5f0 kernel/printk/printk.c:2304 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2329 batadv_check_known_mac_addr+0x21f/0x440 net/batman-adv/hard-interface.c:526 batadv_hard_if_event+0x1048/0x1660 net/batman-adv/hard-interface.c:998 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1970 call_netdevice_notifiers_extack net/core/dev.c:2008 [inline] call_netdevice_notifiers net/core/dev.c:2022 [inline] dev_set_mac_address+0x36f/0x4a0 net/core/dev.c:8860 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:8874 do_setlink+0x6e9/0x3fa0 net/core/rtnetlink.c:2864 __rtnl_newlink+0xc1d/0x1940 net/core/rtnetlink.c:3707 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x3c4/0xdf0 net/core/rtnetlink.c:6480 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x93c/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 __sys_sendto+0x255/0x340 net/socket.c:2194 __do_sys_sendto net/socket.c:2206 [inline] __se_sys_sendto net/socket.c:2202 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2202 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f50e2e7e7dc Code: 1a 51 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 60 51 02 00 48 8b RSP: 002b:00007ffc119b9f80 EFLAGS: 00000293 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f50e3ac4620 RCX: 00007f50e2e7e7dc RDX: 000000000000002c RSI: 00007f50e3ac4670 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffc119b9fd4 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001 R13: 0000000000000000 R14: 00007f50e3ac4670 R15: 0000000000000000 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_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:3e) 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:3e) 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:3e) already exists on: batadv_slave_0 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: batadv0: Interface activated: batadv_slave_0 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3f) 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:3f) 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:3f) 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:3f) 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:3f) already exists on: batadv_slave_1 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! batman_adv: batadv0: Interface activated: batadv_slave_1 netdevsim netdevsim1 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim1 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0 ieee80211 phy13: Selected rate control algorithm 'minstrel_ht' ieee80211 phy14: Selected rate control algorithm 'minstrel_ht'