BUG: sleeping function called from invalid context at net/mac80211/sta_info.c:1962 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 8412, name: kworker/u4:6 4 locks held by kworker/u4:6/8412: #0: ffff8880293ab938 ((wq_completion)phy3){+.+.}-{0:0}, at: process_one_work+0x6f4/0xfc0 kernel/workqueue.c:2245 #1: ffffc90001757d80 ((work_completion)(&sdata->work)){+.+.}-{0:0}, at: process_one_work+0x733/0xfc0 kernel/workqueue.c:2247 #2: ffff888021724d00 (&wdev->mtx){+.+.}-{3:3}, at: sdata_lock net/mac80211/ieee80211_i.h:1021 [inline] #2: ffff888021724d00 (&wdev->mtx){+.+.}-{3:3}, at: ieee80211_ibss_work+0x4e/0x1450 net/mac80211/ibss.c:1683 #3: ffffffff8bae68c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:247 Preemption disabled at: [] __mutex_lock_common+0x15c/0x2f20 kernel/locking/mutex.c:955 CPU: 0 PID: 8412 Comm: kworker/u4:6 Not tainted 5.10.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: phy3 ieee80211_iface_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x137/0x1be lib/dump_stack.c:118 ___might_sleep+0x3ef/0x530 kernel/sched/core.c:7298 sta_info_move_state+0x35/0x830 net/mac80211/sta_info.c:1962 sta_info_free+0xcb/0x330 net/mac80211/sta_info.c:274 sta_info_insert_rcu+0x1462/0x1fb0 net/mac80211/sta_info.c:738 ieee80211_ibss_finish_sta+0x21c/0x2e0 net/mac80211/ibss.c:592 ieee80211_ibss_work+0x218/0x1450 net/mac80211/ibss.c:1700 process_one_work+0x789/0xfc0 kernel/workqueue.c:2272 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2418 kthread+0x36b/0x390 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 ============================= [ BUG: Invalid wait context ] 5.10.0-rc4-syzkaller #0 Tainted: G W ----------------------------- kworker/u4:6/8412 is trying to lock: ffff88802ad829d0 (&local->chanctx_mtx){+.+.}-{3:3}, at: ieee80211_recalc_min_chandef+0x4d/0x120 net/mac80211/util.c:2740 other info that might help us debug this: context-{4:4} 4 locks held by kworker/u4:6/8412: #0: ffff8880293ab938 ((wq_completion)phy3){+.+.}-{0:0}, at: process_one_work+0x6f4/0xfc0 kernel/workqueue.c:2245 #1: ffffc90001757d80 ((work_completion)(&sdata->work)){+.+.}-{0:0}, at: process_one_work+0x733/0xfc0 kernel/workqueue.c:2247 #2: ffff888021724d00 (&wdev->mtx){+.+.}-{3:3}, at: sdata_lock net/mac80211/ieee80211_i.h:1021 [inline] #2: ffff888021724d00 (&wdev->mtx){+.+.}-{3:3}, at: ieee80211_ibss_work+0x4e/0x1450 net/mac80211/ibss.c:1683 #3: ffffffff8bae68c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:247 stack backtrace: CPU: 0 PID: 8412 Comm: kworker/u4:6 Tainted: G W 5.10.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: phy3 ieee80211_iface_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x137/0x1be lib/dump_stack.c:118 print_lock_invalid_wait_context kernel/locking/lockdep.c:4482 [inline] check_wait_context kernel/locking/lockdep.c:4543 [inline] __lock_acquire+0x2617/0x6210 kernel/locking/lockdep.c:4780 lock_acquire+0x114/0x5e0 kernel/locking/lockdep.c:5435 __mutex_lock_common+0x189/0x2f20 kernel/locking/mutex.c:956 __mutex_lock kernel/locking/mutex.c:1103 [inline] mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:1118 ieee80211_recalc_min_chandef+0x4d/0x120 net/mac80211/util.c:2740 sta_info_move_state+0x38a/0x830 net/mac80211/sta_info.c:2019 sta_info_free+0xcb/0x330 net/mac80211/sta_info.c:274 sta_info_insert_rcu+0x1462/0x1fb0 net/mac80211/sta_info.c:738 ieee80211_ibss_finish_sta+0x21c/0x2e0 net/mac80211/ibss.c:592 ieee80211_ibss_work+0x218/0x1450 net/mac80211/ibss.c:1700 process_one_work+0x789/0xfc0 kernel/workqueue.c:2272 worker_thread+0xaa4/0x1460 kernel/workqueue.c:2418 kthread+0x36b/0x390 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 netdevsim netdevsim0 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 device hsr_slave_0 left promiscuous mode device hsr_slave_1 left promiscuous mode batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 batman_adv: batadv0: Removing interface: batadv_slave_1 device bridge_slave_1 left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_0 left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state device veth1_macvtap left promiscuous mode device veth0_macvtap left promiscuous mode device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): Released all slaves