* [PATCH 4.8] ath9k: fix using sta->drv_priv before initializing it
@ 2016-08-02 11:03 Felix Fietkau
2016-08-19 10:09 ` [4.8] " Kalle Valo
2016-08-22 16:08 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Felix Fietkau @ 2016-08-02 11:03 UTC (permalink / raw)
To: linux-wireless; +Cc: kvalo
A station pointer can be passed to the driver on tx, before it has been
marked as associated. Since ath9k_sta_state was initializing the entry
too late, it resulted in some spurious crashes.
Fixes: df3c6eb34da5 ("ath9k: Use sta_state() callback")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/ath/ath9k/main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 7594650..a659e81 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1563,13 +1563,13 @@ static int ath9k_sta_state(struct ieee80211_hw *hw,
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
int ret = 0;
- if (old_state == IEEE80211_STA_AUTH &&
- new_state == IEEE80211_STA_ASSOC) {
+ if (old_state == IEEE80211_STA_NOTEXIST &&
+ new_state == IEEE80211_STA_NONE) {
ret = ath9k_sta_add(hw, vif, sta);
ath_dbg(common, CONFIG,
"Add station: %pM\n", sta->addr);
- } else if (old_state == IEEE80211_STA_ASSOC &&
- new_state == IEEE80211_STA_AUTH) {
+ } else if (old_state == IEEE80211_STA_NONE &&
+ new_state == IEEE80211_STA_NOTEXIST) {
ret = ath9k_sta_remove(hw, vif, sta);
ath_dbg(common, CONFIG,
"Remove station: %pM\n", sta->addr);
--
2.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [4.8] ath9k: fix using sta->drv_priv before initializing it
2016-08-02 11:03 [PATCH 4.8] ath9k: fix using sta->drv_priv before initializing it Felix Fietkau
@ 2016-08-19 10:09 ` Kalle Valo
2016-08-22 16:08 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-08-19 10:09 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, kvalo
Felix Fietkau <nbd@nbd.name> wrote:
> A station pointer can be passed to the driver on tx, before it has been
> marked as associated. Since ath9k_sta_state was initializing the entry
> too late, it resulted in some spurious crashes.
>
> Fixes: df3c6eb34da5 ("ath9k: Use sta_state() callback")
> Cc: stable@vger.kernel.org
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
I'm planning to queue this for 4.8.
--
Sent by pwcli
https://patchwork.kernel.org/patch/9255463/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [4.8] ath9k: fix using sta->drv_priv before initializing it
2016-08-02 11:03 [PATCH 4.8] ath9k: fix using sta->drv_priv before initializing it Felix Fietkau
2016-08-19 10:09 ` [4.8] " Kalle Valo
@ 2016-08-22 16:08 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2016-08-22 16:08 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, kvalo
Felix Fietkau <nbd@nbd.name> wrote:
> A station pointer can be passed to the driver on tx, before it has been
> marked as associated. Since ath9k_sta_state was initializing the entry
> too late, it resulted in some spurious crashes.
>
> Fixes: df3c6eb34da5 ("ath9k: Use sta_state() callback")
> Cc: stable@vger.kernel.org
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Thanks, 1 patch applied to ath-current branch of ath.git:
7711aaf08ad3 ath9k: fix using sta->drv_priv before initializing it
--
Sent by pwcli
https://patchwork.kernel.org/patch/9255463/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-22 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-02 11:03 [PATCH 4.8] ath9k: fix using sta->drv_priv before initializing it Felix Fietkau
2016-08-19 10:09 ` [4.8] " Kalle Valo
2016-08-22 16:08 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox