2023-06-08 10:52:41

by Wen Gong

[permalink] [raw]
Subject: [PATCH] wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()

"mutex_unlock(&ar->conf_mutex);" is always called at end of function
ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
sure lock/unlock is paired.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <[email protected]>
---
drivers/net/wireless/ath/ath12k/mac.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index ee792822b411..e65f5337d8f5 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5910,7 +5910,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
}

arvif->is_started = false;
- mutex_unlock(&ar->conf_mutex);
}

ret = ath12k_mac_vdev_stop(arvif);

base-commit: 0a00db612b6df1fad80485e3642529d1f28ea084
--
2.40.1



Subject: Re: [PATCH] wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()



On 6/8/2023 4:14 PM, Wen Gong wrote:
> "mutex_unlock(&ar->conf_mutex);" is always called at end of function
> ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
> sure lock/unlock is paired.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Wen Gong <[email protected]>
> ---
> drivers/net/wireless/ath/ath12k/mac.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index ee792822b411..e65f5337d8f5 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -5910,7 +5910,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
> }
>
> arvif->is_started = false;
> - mutex_unlock(&ar->conf_mutex);
> }
>
> ret = ath12k_mac_vdev_stop(arvif);
>
> base-commit: 0a00db612b6df1fad80485e3642529d1f28ea084

LGTM

2023-06-15 11:38:06

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()

Wen Gong <[email protected]> wrote:

> "mutex_unlock(&ar->conf_mutex);" is always called at end of function
> ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
> sure lock/unlock is paired.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Wen Gong <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

3a5d50f8eb4f wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches