mirror of https://lore.kernel.org/ath12k/
 help / color / mirror / Atom feed
* Re: [PATCH RFC 25/33] wifi: ath12k: Fix locking in error paths
       [not found] ` <20250206175114.1974171-26-bvanassche@acm.org>
@ 2025-02-06 18:25   ` Jeff Johnson
  2025-02-06 22:13     ` Bart Van Assche
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Johnson @ 2025-02-06 18:25 UTC (permalink / raw)
  To: Bart Van Assche, Peter Zijlstra
  Cc: Will Deacon, Christoph Hellwig, Greg Kroah-Hartman, Marco Elver,
	Nick Desaulniers, Nathan Chancellor, Kees Cook, Jann Horn,
	linux-kernel, Karthikeyan Periyasamy, linux-wireless,
	ath12k@lists.infradead.org

On 2/6/2025 9:51 AM, Bart Van Assche wrote:
> If ag->mutex has been locked, unlock it before returning. If it has not
> been locked, do not unlock it before returning. These bugs have been
> detected by the Clang thread-safety analyzer.
> 
> Cc: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
> Fixes: ee146e11b4d9 ("wifi: ath12k: refactor core start based on hardware group")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/net/wireless/ath/ath12k/core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
> index 0606116d6b9c..212cd935e60a 100644
> --- a/drivers/net/wireless/ath/ath12k/core.c
> +++ b/drivers/net/wireless/ath/ath12k/core.c
> @@ -1122,16 +1122,18 @@ int ath12k_core_qmi_firmware_ready(struct ath12k_base *ab)
>  		ath12k_core_stop(ab);
>  		mutex_unlock(&ab->core_lock);
>  	}
> +	mutex_unlock(&ag->mutex);
>  	goto exit;
>  
>  err_dp_free:
>  	ath12k_dp_free(ab);
>  	mutex_unlock(&ab->core_lock);
> +	mutex_unlock(&ag->mutex);
> +
>  err_firmware_stop:
>  	ath12k_qmi_firmware_stop(ab);
>  
>  exit:
> -	mutex_unlock(&ag->mutex);
>  	return ret;
>  }
>  

This looks like a legitimate issue.

Can you submit this as a single patch and cc the ath12k and linux-wireless
lists (as I've done in this reply)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH RFC 25/33] wifi: ath12k: Fix locking in error paths
  2025-02-06 18:25   ` [PATCH RFC 25/33] wifi: ath12k: Fix locking in error paths Jeff Johnson
@ 2025-02-06 22:13     ` Bart Van Assche
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2025-02-06 22:13 UTC (permalink / raw)
  To: Jeff Johnson, Peter Zijlstra
  Cc: Will Deacon, Christoph Hellwig, Greg Kroah-Hartman, Marco Elver,
	Nick Desaulniers, Nathan Chancellor, Kees Cook, Jann Horn,
	linux-kernel, Karthikeyan Periyasamy, linux-wireless,
	ath12k@lists.infradead.org

On 2/6/25 10:25 AM, Jeff Johnson wrote:
> Can you submit this as a single patch and cc the ath12k and linux-wireless
> lists (as I've done in this reply)

Done :-)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-06 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250206175114.1974171-1-bvanassche@acm.org>
     [not found] ` <20250206175114.1974171-26-bvanassche@acm.org>
2025-02-06 18:25   ` [PATCH RFC 25/33] wifi: ath12k: Fix locking in error paths Jeff Johnson
2025-02-06 22:13     ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox