From patchwork Sat Jul 25 14:54:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 37329 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6PEsiHZ010523 for ; Sat, 25 Jul 2009 14:54:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751704AbZGYOym (ORCPT ); Sat, 25 Jul 2009 10:54:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751821AbZGYOym (ORCPT ); Sat, 25 Jul 2009 10:54:42 -0400 Received: from xc.sipsolutions.net ([83.246.72.84]:54371 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751565AbZGYOyl (ORCPT ); Sat, 25 Jul 2009 10:54:41 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MUidy-00087b-Pi; Sat, 25 Jul 2009 16:54:39 +0200 Subject: [PATCH] nl80211: add missing parameter clearing From: Johannes Berg To: John Linville Cc: linux-wireless , Jouni Malinen , Maxim Levitsky Date: Sat, 25 Jul 2009 16:54:36 +0200 Message-Id: <1248533676.19945.2.camel@johannes.local> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- net/wireless/nl80211.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- wireless-testing.orig/net/wireless/nl80211.c 2009-07-25 16:50:39.000000000 +0200 +++ wireless-testing/net/wireless/nl80211.c 2009-07-25 16:51:00.000000000 +0200 @@ -3385,6 +3385,8 @@ static int nl80211_crypto_settings(struc 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]) {