From patchwork Mon May 13 12:45:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: voncken X-Patchwork-Id: 2558421 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D6372DF2E5 for ; Mon, 13 May 2013 12:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503Ab3EMMpj (ORCPT ); Mon, 13 May 2013 08:45:39 -0400 Received: from smtp06.msg.oleane.net ([62.161.4.6]:59546 "EHLO smtp06.msg.oleane.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750874Ab3EMMpi convert rfc822-to-8bit (ORCPT ); Mon, 13 May 2013 08:45:38 -0400 Received: from RD8 ([195.6.104.67]) by smtp06.msg.oleane.net (MTA) with ESMTP id r4DCjYQG015219; Mon, 13 May 2013 14:45:34 +0200 X-Oleane-Rep: REPA From: "voncken" To: Cc: References: <1366363242-29481-1-git-send-email-cedric.voncken@acksys.fr> In-Reply-To: <1366363242-29481-1-git-send-email-cedric.voncken@acksys.fr> Subject: RE: [PATCH] mac80211: Fix driver crash when STA_NOTIFY_AWAKE occures Date: Mon, 13 May 2013 14:45:34 +0200 Message-ID: <01a401ce4fd7$c2e9d3b0$48bd7b10$@acksys.fr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGaKPXscRkQM3HeEPwneCRQtPvux5lrXGoA Content-Language: fr X-Spam-Flag: NO X-PMX-Spam: Probability=8% X-PFSI-Info: PMX 5.5.9.395186, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.5.13.123322 (no antivirus check) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This default occurs when I set a mesh interface with HT mode and SAE user daemon from cozibit. I have put more information in thread "ath9k null pointer with mesh network" in the linux-wireless mailing list. Cedric Voncken -----Message d'origine----- De : linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-owner@vger.kernel.org] De la part de cedric voncken Envoyé : vendredi 19 avril 2013 11:21 À : linux-wireless@vger.kernel.org Cc : cedric voncken Objet : [PATCH] mac80211: Fix driver crash when STA_NOTIFY_AWAKE occures If the device uses the HT mode and receives a frame from a sta whith state < IEEE80211_STA_ASSOC then the null pointer exception crashes the Linnux kernel. In the case of ath9k, the function ath_tx_node_init is indirectly called by drv_sta_state (in net/mac80211/driver-ops.h) only when the sta_state goes to IEEE80211_STA_ASSOC from IEEE80211_STA_AUTH. Signed-off-by: cedric VONCKEN --- net/mac80211/sta_info.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) skb_queue_head_init(&pending); -- 1.7.2.5 -- 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 -- 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 diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 11216bc..bcfd7b0 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -1040,7 +1040,8 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) BUILD_BUG_ON(BITS_TO_LONGS(IEEE80211_NUM_TIDS) > 1); sta->driver_buffered_tids = 0; - if (!(local->hw.flags & IEEE80211_HW_AP_LINK_PS)) + if (!(local->hw.flags & IEEE80211_HW_AP_LINK_PS && + sta->sta_state >= IEEE80211_STA_ASSOC)) drv_sta_notify(local, sdata, STA_NOTIFY_AWAKE, &sta->sta);