macsec0: entered promiscuous mode BUG: sleeping function called from invalid context at kernel/locking/mutex.c:579 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 7576, name: syz.0.1337 preempt_count: 201, expected: 0 RCU nest depth: 0, expected: 0 3 locks held by syz.0.1337/7576: #0: ffffffff88fed720 (&ops->srcu#2){.+.+}-{0:0}, at: rtnl_link_ops_get+0xea/0x31c net/core/rtnetlink.c:573 #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:80 [inline] #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:341 [inline] #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x64c/0x1d78 net/core/rtnetlink.c:4054 #2: ffffaf801ef62368 (&macsec_netdev_addr_lock_key/1){+...}-{3:3}, at: netif_addr_lock_bh include/linux/netdevice.h:4805 [inline] #2: ffffaf801ef62368 (&macsec_netdev_addr_lock_key/1){+...}-{3:3}, at: dev_uc_add+0x76/0x108 net/core/dev_addr_lists.c:689 Preemption disabled at: [] local_bh_disable include/linux/bottom_half.h:20 [inline] [] netif_addr_lock_bh include/linux/netdevice.h:4804 [inline] [] dev_uc_add+0x66/0x108 net/core/dev_addr_lists.c:689 CPU: 1 UID: 0 PID: 7576 Comm: syz.0.1337 Not tainted 6.16.0-rc1-syzkaller-gfda589c28604 #0 PREEMPT Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [] dump_stack+0x1c/0x24 lib/dump_stack.c:129 [] __might_resched+0x59c/0x5f8 kernel/sched/core.c:8800 [] __might_sleep+0x86/0xca kernel/sched/core.c:8729 [] __mutex_lock_common kernel/locking/mutex.c:579 [inline] [] __mutex_lock+0xf4/0x1292 kernel/locking/mutex.c:747 [] mutex_lock_nested+0x14/0x1c kernel/locking/mutex.c:799 [] netdev_lock include/linux/netdevice.h:2756 [inline] [] netdev_lock_ops include/net/netdev_lock.h:42 [inline] [] netdev_lock_ops include/net/netdev_lock.h:39 [inline] [] dev_set_promiscuity+0xb8/0x24c net/core/dev_api.c:286 [] macsec_dev_change_rx_flags+0x136/0x176 drivers/net/macsec.c:3696 [] dev_change_rx_flags net/core/dev.c:9241 [inline] [] __dev_set_promiscuity+0x6aa/0x6fa net/core/dev.c:9285 [] __dev_set_rx_mode+0x1da/0x288 net/core/dev.c:9370 [] dev_uc_add+0xf2/0x108 net/core/dev_addr_lists.c:693 [] macsec_dev_open+0xd4/0x4bc drivers/net/macsec.c:3606 [] __dev_open+0x39c/0x96e net/core/dev.c:1683 [] __dev_change_flags+0x4f8/0x6a4 net/core/dev.c:9458 [] rtnl_configure_link+0xf6/0x26a net/core/rtnetlink.c:3577 [] rtnl_newlink_create net/core/rtnetlink.c:3833 [inline] [] __rtnl_newlink net/core/rtnetlink.c:3940 [inline] [] rtnl_newlink+0xcae/0x1d78 net/core/rtnetlink.c:4055 [] rtnetlink_rcv_msg+0x9e2/0xdbe net/core/rtnetlink.c:6944 [] netlink_rcv_skb+0x206/0x3be net/netlink/af_netlink.c:2534 [] rtnetlink_rcv+0x26/0x30 net/core/rtnetlink.c:6971 [] netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] [] netlink_unicast+0x4f0/0x82c net/netlink/af_netlink.c:1339 [] netlink_sendmsg+0x85e/0xdd6 net/netlink/af_netlink.c:1883 [] sock_sendmsg_nosec net/socket.c:712 [inline] [] __sock_sendmsg+0xcc/0x160 net/socket.c:727 [] ____sys_sendmsg+0x63e/0x79c net/socket.c:2566 [] ___sys_sendmsg+0x144/0x1e6 net/socket.c:2620 [] __sys_sendmsg+0x188/0x246 net/socket.c:2652 [] __do_sys_sendmsg net/socket.c:2657 [inline] [] __se_sys_sendmsg net/socket.c:2655 [inline] [] __riscv_sys_sendmsg+0x70/0xa2 net/socket.c:2655 [] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 [] do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:341 [] handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197 ============================= [ BUG: Invalid wait context ] 6.16.0-rc1-syzkaller-gfda589c28604 #0 Tainted: G W ----------------------------- syz.0.1337/7576 is trying to lock: ffffaf801a410d10 (&dev_instance_lock_key#15){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2756 [inline] ffffaf801a410d10 (&dev_instance_lock_key#15){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:42 [inline] ffffaf801a410d10 (&dev_instance_lock_key#15){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:39 [inline] ffffaf801a410d10 (&dev_instance_lock_key#15){+.+.}-{4:4}, at: dev_set_promiscuity+0xb8/0x24c net/core/dev_api.c:286 other info that might help us debug this: context-{5:5} 3 locks held by syz.0.1337/7576: #0: ffffffff88fed720 (&ops->srcu#2){.+.+}-{0:0}, at: rtnl_link_ops_get+0xea/0x31c net/core/rtnetlink.c:573 #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:80 [inline] #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:341 [inline] #1: ffffffff89866e88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x64c/0x1d78 net/core/rtnetlink.c:4054 #2: ffffaf801ef62368 (&macsec_netdev_addr_lock_key/1){+...}-{3:3}, at: netif_addr_lock_bh include/linux/netdevice.h:4805 [inline] #2: ffffaf801ef62368 (&macsec_netdev_addr_lock_key/1){+...}-{3:3}, at: dev_uc_add+0x76/0x108 net/core/dev_addr_lists.c:689 stack backtrace: CPU: 1 UID: 0 PID: 7576 Comm: syz.0.1337 Tainted: G W 6.16.0-rc1-syzkaller-gfda589c28604 #0 PREEMPT Tainted: [W]=WARN Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [] dump_stack+0x1c/0x24 lib/dump_stack.c:129 [] print_lock_invalid_wait_context kernel/locking/lockdep.c:4833 [inline] [] check_wait_context kernel/locking/lockdep.c:4905 [inline] [] __lock_acquire+0xa9e/0x24ea kernel/locking/lockdep.c:5190 [] lock_acquire kernel/locking/lockdep.c:5871 [inline] [] lock_acquire+0x1ac/0x448 kernel/locking/lockdep.c:5828 [] __mutex_lock_common kernel/locking/mutex.c:602 [inline] [] __mutex_lock+0x166/0x1292 kernel/locking/mutex.c:747 [] mutex_lock_nested+0x14/0x1c kernel/locking/mutex.c:799 [] netdev_lock include/linux/netdevice.h:2756 [inline] [] netdev_lock_ops include/net/netdev_lock.h:42 [inline] [] netdev_lock_ops include/net/netdev_lock.h:39 [inline] [] dev_set_promiscuity+0xb8/0x24c net/core/dev_api.c:286 [] macsec_dev_change_rx_flags+0x136/0x176 drivers/net/macsec.c:3696 [] dev_change_rx_flags net/core/dev.c:9241 [inline] [] __dev_set_promiscuity+0x6aa/0x6fa net/core/dev.c:9285 [] __dev_set_rx_mode+0x1da/0x288 net/core/dev.c:9370 [] dev_uc_add+0xf2/0x108 net/core/dev_addr_lists.c:693 [] macsec_dev_open+0xd4/0x4bc drivers/net/macsec.c:3606 [] __dev_open+0x39c/0x96e net/core/dev.c:1683 [] __dev_change_flags+0x4f8/0x6a4 net/core/dev.c:9458 [] rtnl_configure_link+0xf6/0x26a net/core/rtnetlink.c:3577 [] rtnl_newlink_create net/core/rtnetlink.c:3833 [inline] [] __rtnl_newlink net/core/rtnetlink.c:3940 [inline] [] rtnl_newlink+0xcae/0x1d78 net/core/rtnetlink.c:4055 [] rtnetlink_rcv_msg+0x9e2/0xdbe net/core/rtnetlink.c:6944 [] netlink_rcv_skb+0x206/0x3be net/netlink/af_netlink.c:2534 [] rtnetlink_rcv+0x26/0x30 net/core/rtnetlink.c:6971 [] netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] [] netlink_unicast+0x4f0/0x82c net/netlink/af_netlink.c:1339 [] netlink_sendmsg+0x85e/0xdd6 net/netlink/af_netlink.c:1883 [] sock_sendmsg_nosec net/socket.c:712 [inline] [] __sock_sendmsg+0xcc/0x160 net/socket.c:727 [] ____sys_sendmsg+0x63e/0x79c net/socket.c:2566 [] ___sys_sendmsg+0x144/0x1e6 net/socket.c:2620 [] __sys_sendmsg+0x188/0x246 net/socket.c:2652 [] __do_sys_sendmsg net/socket.c:2657 [inline] [] __se_sys_sendmsg net/socket.c:2655 [inline] [] __riscv_sys_sendmsg+0x70/0xa2 net/socket.c:2655 [] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 [] do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:341 [] handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197 macsec2: entered allmulticast mode macsec0: entered allmulticast mode netdevsim netdevsim0 netdevsim0: entered allmulticast mode