From: Johannes Berg <johannes@sipsolutions.net>
To: cedric voncken <cedric.voncken@acksys.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Fix driver crash when STA_NOTIFY_AWAKE occures
Date: Mon, 22 Apr 2013 15:54:41 +0200 [thread overview]
Message-ID: <1366638881.8637.17.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1366363242-29481-1-git-send-email-cedric.voncken@acksys.fr> (sfid-20130419_112051_358756_8C409DEB)
On Fri, 2013-04-19 at 11:20 +0200, cedric voncken wrote:
> 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 <cedric.voncken@acksys.fr>
> ---
> net/mac80211/sta_info.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> 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))
This seems like a bad workaround -- how are you getting to this point
w/o being associated?
johannes
next prev parent reply other threads:[~2013-04-22 13:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 9:20 [PATCH] mac80211: Fix driver crash when STA_NOTIFY_AWAKE occures cedric voncken
2013-04-22 13:54 ` Johannes Berg [this message]
2013-04-22 14:09 ` voncken
2013-05-13 12:45 ` voncken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366638881.8637.17.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=cedric.voncken@acksys.fr \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox