* [PATCH] ath10k: add cleanup in ath10k_sta_state()
@ 2019-08-15 21:04 Wenwen Wang
2019-09-17 14:11 ` Kalle Valo
2019-11-13 19:28 ` Bjorn Andersson
0 siblings, 2 replies; 5+ messages in thread
From: Wenwen Wang @ 2019-08-15 21:04 UTC (permalink / raw)
To: Wenwen Wang
Cc: Kalle Valo, David S. Miller,
open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
open list:NETWORKING DRIVERS (WIRELESS),
open list:NETWORKING DRIVERS, open list
If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
go to the 'exit' label.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
---
drivers/net/wireless/ath/ath10k/mac.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 0606416..f99e6d2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -6548,8 +6548,12 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
spin_unlock_bh(&ar->data_lock);
- if (!sta->tdls)
+ if (!sta->tdls) {
+ ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
+ ath10k_mac_dec_num_stations(arvif, sta);
+ kfree(arsta->tx_stats);
goto exit;
+ }
ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
WMI_TDLS_ENABLE_ACTIVE);
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: add cleanup in ath10k_sta_state()
2019-08-15 21:04 [PATCH] ath10k: add cleanup in ath10k_sta_state() Wenwen Wang
@ 2019-09-17 14:11 ` Kalle Valo
2019-11-13 19:28 ` Bjorn Andersson
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-09-17 14:11 UTC (permalink / raw)
To: Wenwen Wang
Cc: Wenwen Wang, David S. Miller,
open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
open list:NETWORKING DRIVERS (WIRELESS),
open list:NETWORKING DRIVERS, open list
Wenwen Wang <wenwen@cs.uga.edu> wrote:
> If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
> leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
> go to the 'exit' label.
>
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
334f5b61a6f2 ath10k: add cleanup in ath10k_sta_state()
--
https://patchwork.kernel.org/patch/11096481/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: add cleanup in ath10k_sta_state()
2019-08-15 21:04 [PATCH] ath10k: add cleanup in ath10k_sta_state() Wenwen Wang
2019-09-17 14:11 ` Kalle Valo
@ 2019-11-13 19:28 ` Bjorn Andersson
2019-11-13 19:37 ` Jeffrey Hugo
2019-11-14 7:42 ` Kalle Valo
1 sibling, 2 replies; 5+ messages in thread
From: Bjorn Andersson @ 2019-11-13 19:28 UTC (permalink / raw)
To: Wenwen Wang, Kalle Valo
Cc: David S. Miller,
open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
open list:NETWORKING DRIVERS (WIRELESS),
open list:NETWORKING DRIVERS, open list, jeffrey.l.hugo, govinds
On Thu 15 Aug 14:04 PDT 2019, Wenwen Wang wrote:
> If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
> leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
> go to the 'exit' label.
>
Unfortunately this patch consistently crashes all my msm8998, sdm845 and
qcs404 devices (running ath10k_snoc). Upon trying to join a network the
WiFi firmware crashes with the following:
[ 124.315286] wlan0: authenticate with 70:3a:cb:4d:34:f3
[ 124.334051] wlan0: send auth to 70:3a:cb:4d:34:f3 (try 1/3)
[ 124.338828] wlan0: authenticated
[ 124.342470] wlan0: associate with 70:3a:cb:4d:34:f3 (try 1/3)
[ 124.347223] wlan0: RX AssocResp from 70:3a:cb:4d:34:f3 (capab=0x1011 status=0 aid=2)
[ 124.402535] qcom-q6v5-mss 4080000.remoteproc: fatal error received: err_qdi.c:456:EF:wlan_process:1:cmnos_thread.c:3900:Asserted in wlan_vdev.c:_wlan_vdev_up:3219
Can we please revert it for v5.5?
Regards,
Bjorn
> Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> ---
> drivers/net/wireless/ath/ath10k/mac.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> index 0606416..f99e6d2 100644
> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -6548,8 +6548,12 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
>
> spin_unlock_bh(&ar->data_lock);
>
> - if (!sta->tdls)
> + if (!sta->tdls) {
> + ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
> + ath10k_mac_dec_num_stations(arvif, sta);
> + kfree(arsta->tx_stats);
> goto exit;
> + }
>
> ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
> WMI_TDLS_ENABLE_ACTIVE);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: add cleanup in ath10k_sta_state()
2019-11-13 19:28 ` Bjorn Andersson
@ 2019-11-13 19:37 ` Jeffrey Hugo
2019-11-14 7:42 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey Hugo @ 2019-11-13 19:37 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Wenwen Wang, Kalle Valo, David S. Miller,
open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
open list:NETWORKING DRIVERS (WIRELESS),
open list:NETWORKING DRIVERS, open list, govinds
On Wed, Nov 13, 2019 at 12:28 PM Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Thu 15 Aug 14:04 PDT 2019, Wenwen Wang wrote:
>
> > If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
> > leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
> > go to the 'exit' label.
> >
>
> Unfortunately this patch consistently crashes all my msm8998, sdm845 and
> qcs404 devices (running ath10k_snoc). Upon trying to join a network the
> WiFi firmware crashes with the following:
>
> [ 124.315286] wlan0: authenticate with 70:3a:cb:4d:34:f3
> [ 124.334051] wlan0: send auth to 70:3a:cb:4d:34:f3 (try 1/3)
> [ 124.338828] wlan0: authenticated
> [ 124.342470] wlan0: associate with 70:3a:cb:4d:34:f3 (try 1/3)
> [ 124.347223] wlan0: RX AssocResp from 70:3a:cb:4d:34:f3 (capab=0x1011 status=0 aid=2)
> [ 124.402535] qcom-q6v5-mss 4080000.remoteproc: fatal error received: err_qdi.c:456:EF:wlan_process:1:cmnos_thread.c:3900:Asserted in wlan_vdev.c:_wlan_vdev_up:3219
>
> Can we please revert it for v5.5?
I observe the same, and concur with this request.
>
> Regards,
> Bjorn
>
> > Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
> > ---
> > drivers/net/wireless/ath/ath10k/mac.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
> > index 0606416..f99e6d2 100644
> > --- a/drivers/net/wireless/ath/ath10k/mac.c
> > +++ b/drivers/net/wireless/ath/ath10k/mac.c
> > @@ -6548,8 +6548,12 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
> >
> > spin_unlock_bh(&ar->data_lock);
> >
> > - if (!sta->tdls)
> > + if (!sta->tdls) {
> > + ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
> > + ath10k_mac_dec_num_stations(arvif, sta);
> > + kfree(arsta->tx_stats);
> > goto exit;
> > + }
> >
> > ret = ath10k_wmi_update_fw_tdls_state(ar, arvif->vdev_id,
> > WMI_TDLS_ENABLE_ACTIVE);
> > --
> > 2.7.4
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath10k: add cleanup in ath10k_sta_state()
2019-11-13 19:28 ` Bjorn Andersson
2019-11-13 19:37 ` Jeffrey Hugo
@ 2019-11-14 7:42 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-11-14 7:42 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Wenwen Wang, David S. Miller,
open list:QUALCOMM ATHEROS ATH10K WIRELESS DRIVER,
open list:NETWORKING DRIVERS (WIRELESS),
open list:NETWORKING DRIVERS, open list, jeffrey.l.hugo, govinds
Bjorn Andersson <bjorn.andersson@linaro.org> writes:
> On Thu 15 Aug 14:04 PDT 2019, Wenwen Wang wrote:
>
>> If 'sta->tdls' is false, no cleanup is executed, leading to memory/resource
>> leaks, e.g., 'arsta->tx_stats'. To fix this issue, perform cleanup before
>> go to the 'exit' label.
>>
>
> Unfortunately this patch consistently crashes all my msm8998, sdm845 and
> qcs404 devices (running ath10k_snoc). Upon trying to join a network the
> WiFi firmware crashes with the following:
>
> [ 124.315286] wlan0: authenticate with 70:3a:cb:4d:34:f3
> [ 124.334051] wlan0: send auth to 70:3a:cb:4d:34:f3 (try 1/3)
> [ 124.338828] wlan0: authenticated
> [ 124.342470] wlan0: associate with 70:3a:cb:4d:34:f3 (try 1/3)
> [ 124.347223] wlan0: RX AssocResp from 70:3a:cb:4d:34:f3 (capab=0x1011 status=0 aid=2)
> [ 124.402535] qcom-q6v5-mss 4080000.remoteproc: fatal error received:
> err_qdi.c:456:EF:wlan_process:1:cmnos_thread.c:3900:Asserted in
> wlan_vdev.c:_wlan_vdev_up:3219
>
> Can we please revert it for v5.5?
Yes, let's revert it. And thanks for sending the patch to do that:
https://patchwork.kernel.org/patch/11242743/
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-14 7:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 21:04 [PATCH] ath10k: add cleanup in ath10k_sta_state() Wenwen Wang
2019-09-17 14:11 ` Kalle Valo
2019-11-13 19:28 ` Bjorn Andersson
2019-11-13 19:37 ` Jeffrey Hugo
2019-11-14 7:42 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).