Re: WARNING in hwsim_new_radio_nl

From: Paolo Abeni
Date: Tue Apr 14 2020 - 06:43:58 EST


#syz test git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master

I don't see why the bisection pointed to the MPTCP commit ?!? the
following patch should address the issue.
---
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7fe8207db6ae..2082abdb08d4 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -635,7 +635,8 @@ static const struct nla_policy hwsim_genl_policy[HWSIM_ATTR_MAX + 1] = {
[HWSIM_ATTR_SUPPORT_P2P_DEVICE] = { .type = NLA_FLAG },
[HWSIM_ATTR_USE_CHANCTX] = { .type = NLA_FLAG },
[HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE] = { .type = NLA_FLAG },
- [HWSIM_ATTR_RADIO_NAME] = { .type = NLA_STRING },
+ [HWSIM_ATTR_RADIO_NAME] = { .type = NLA_STRING,
+ .len = NL80211_WIPHY_NAME_MAXLEN },
[HWSIM_ATTR_NO_VIF] = { .type = NLA_FLAG },
[HWSIM_ATTR_FREQ] = { .type = NLA_U32 },
[HWSIM_ATTR_TX_INFO_FLAGS] = { .type = NLA_BINARY },