All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: Kang Yang <quic_kangyang@quicinc.com>,
	 <ath11k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] wifi: ath11k: use work queue to process beacon tx event
Date: Fri, 28 Jun 2024 00:01:15 +0300	[thread overview]
Message-ID: <875xtugkx0.fsf@kernel.org> (raw)
In-Reply-To: <1e69ca99-fb08-4c44-93d8-33689ff62aca@quicinc.com> (Jeff Johnson's message of "Thu, 27 Jun 2024 12:24:24 -0700")

Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> On 6/25/2024 10:35 PM, Kang Yang wrote:
>
>> Commit 3a415daa3e8b ("wifi: ath11k: add P2P IE in beacon template")
>> from Feb 28, 2024 (linux-next), leads to the following Smatch static
>> checker warning:
>> 
>> drivers/net/wireless/ath/ath11k/wmi.c:1742 ath11k_wmi_p2p_go_bcn_ie()
>> warn: sleeping in atomic context
>> 
>> The reason is that ath11k_bcn_tx_status_event() will directly call might
>> sleep function ath11k_wmi_cmd_send() during RCU read-side critical
>> sections. The call trace is like:
>> 
>> ath11k_bcn_tx_status_event()
>> -> rcu_read_lock()
>> -> ath11k_mac_bcn_tx_event()
>> 	-> ath11k_mac_setup_bcn_tmpl()
>> 	……
>> 		-> ath11k_wmi_bcn_tmpl()
>> 			-> ath11k_wmi_cmd_send()
>> -> rcu_read_unlock()
>> 
>> Commit 886433a98425 ("ath11k: add support for BSS color change") added the
>> ath11k_mac_bcn_tx_event(), commit 01e782c89108 ("ath11k: fix warning
>> of RCU usage for ath11k_mac_get_arvif_by_vdev_id()") added the RCU lock
>> to avoid warning but also introduced this BUG.
>> 
>> Use work queue to avoid directly calling ath11k_mac_bcn_tx_event()
>> during RCU critical sections. No need to worry the deletion of vif.
>
> comment nit:
> s/worry the deletion of vif. Because/worry about the deletion of vif because/
>
> Kalle can apply this to pending

Yup, fixed.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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


  reply	other threads:[~2024-06-27 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  5:35 [PATCH] wifi: ath11k: use work queue to process beacon tx event Kang Yang
2024-06-27 19:24 ` Jeff Johnson
2024-06-27 21:01   ` Kalle Valo [this message]
2024-07-10 16:25 ` Kalle Valo

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=875xtugkx0.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=quic_kangyang@quicinc.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.