From: Johannes Berg Date: Sat, 25 Jul 2009 14:54:36 +0000 (+0200) Subject: nl80211: add missing parameter clearing X-Git-Tag: firefly_0821_release~12983^2~506^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c0b2bbd833a5a26b5a9425cb9a7eb66bbe736dd1;p=firefly-linux-kernel-4.4.55.git nl80211: add missing parameter clearing Jouni and Maxim reported an oops when using wpa_supplicant -Dnl80211, which seems to be due to random data being contained in the crypto settings for the assoc() command. This seems to be due to the missing memset here, so add it -- it's certainly missing but I'm not 100% certain that it will fix the problem. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 283f1a890dad..c951eb2b07d5 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -3385,6 +3385,8 @@ static int nl80211_crypto_settings(struct genl_info *info, struct cfg80211_crypto_settings *settings, int cipher_limit) { + memset(settings, 0, sizeof(*settings)); + settings->control_port = info->attrs[NL80211_ATTR_CONTROL_PORT]; if (info->attrs[NL80211_ATTR_CIPHER_SUITES_PAIRWISE]) {