diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c index 02b6d81cc..de3bfeaa3 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c @@ -7156,6 +7156,15 @@ static struct genl_family hwsim_genl_family __ro_after_init = { .resv_start_op = HWSIM_CMD_REPORT_PMSR + 1, // match with __HWSIM_CMD_MAX .mcgrps = hwsim_mcgrps, .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps), + /* + * HWSIM_CMD_NEW_RADIO goes through ieee80211_register_hw(), which + * acquires the RTNL mutex. Without parallel_ops the generic netlink + * core serializes all of these handlers with genl_mutex, so a task + * would hold genl_mutex while waiting for RTNL and can deadlock with + * code that holds RTNL and needs genl_mutex. The radio list is + * protected by hwsim_radio_lock, so the handlers can run in parallel. + */ + .parallel_ops = true, }; static void remove_user_radios(u32 portid, int netgroup)