From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Yu-Hsiang Tseng <asas1asas200@gmail.com>
Cc: Jeff Johnson <jjohnson@kernel.org>,
ath12k@lists.infradead.org,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>,
Rameshkumar Sundaram <quic_ramess@quicinc.com>,
Kalle Valo <kvalo@kernel.org>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2] wifi: ath12k: fix false positive RCU warnings on PREEMPT_RT
Date: Wed, 22 Apr 2026 16:23:25 +0200 [thread overview]
Message-ID: <20260422142325.Glnd_2Zc@linutronix.de> (raw)
In-Reply-To: <20260421172500.1050754-1-asas1asas200@gmail.com>
On 2026-04-22 01:25:00 [+0800], Yu-Hsiang Tseng wrote:
> Two functions in ath12k assert that the caller holds an RCU read lock:
> ath12k_mac_get_arvif() and ath12k_p2p_noa_update_vdev_iter(). Both use:
>
> WARN_ON(!rcu_read_lock_any_held());
>
> On PREEMPT_RT kernels built with CONFIG_PROVE_RCU=n, this produces a
> false positive splat whenever these functions are invoked from paths
> that do hold the RCU read lock (e.g. firmware stats processing or
> mac80211 interface iteration).
It depends what RCU section is expected/ tested for. SMP+preempt can use
preemptible RCU which does not disable preemption either. So this is not
PREEMPT_RT specific. It would be PREEMPT_RT specific if the RCU section
is implied by NAPI processing to so.
> Root cause:
>
> - On !PROVE_RCU, rcu_read_lock_any_held() is a static inline that
> returns !preemptible() as a proxy for "in an RCU read section".
>
> - On PREEMPT_RT, rcu_read_lock() does not disable preemption. A
> task can therefore be preemptible while legitimately holding an
> RCU read lock.
As elaborated above, this is not PREEMPT_RT specific but preemptible
TREE RCU.
> - Callers such as ath12k_wmi_tlv_rssi_chain_parse() (via guard(rcu)())
> and ieee80211_iterate_active_interfaces_atomic() do hold the RCU
> read lock, so these warnings are incorrect.
If both this then use this then I guess something like
lockdep_assert_in_rcu_read_lock()
is what you look for.
> Typical splat seen on a WCN7850 station with periodic fw stats
> processing:
>
> WARNING: drivers/net/wireless/ath/ath12k/mac.c:791 at
> ath12k_mac_get_arvif+0x9e/0xd0 [ath12k]
> Tainted: G W O 6.19.13-rt #1 PREEMPT_RT
> Call Trace:
> ath12k_wmi_tlv_rssi_chain_parse+0x69/0x170 [ath12k]
> ath12k_wmi_tlv_iter+0x7f/0x120 [ath12k]
> ath12k_wmi_tlv_fw_stats_parse+0x342/0x6b0 [ath12k]
> ath12k_wmi_op_rx+0xe9e/0x3150 [ath12k]
> ath12k_htc_rx_completion_handler+0x3df/0x5b0 [ath12k]
> ath12k_ce_per_engine_service+0x325/0x3e0 [ath12k]
> ath12k_pci_ce_workqueue+0x20/0x40 [ath12k]
If that is the call chain and there are no spinlocks involved then
PREEMPT+SMP+lockdep should trigger with this patch, too. The suggestion
above restricts this to lockdep only but your patch does so to.
Sebastian
next prev parent reply other threads:[~2026-04-22 14:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 16:10 [PATCH] wifi: ath12k: fix false positive RCU warning on PREEMPT_RT Yu-Hsiang Tseng
2026-04-21 2:24 ` Baochen Qiang
2026-04-21 17:25 ` [PATCH v2] wifi: ath12k: fix false positive RCU warnings " Yu-Hsiang Tseng
2026-04-21 17:32 ` Rameshkumar Sundaram
2026-04-21 21:27 ` Jeff Johnson
2026-04-22 13:33 ` Jeff Johnson
2026-04-22 18:29 ` 曾昱翔
2026-04-22 2:06 ` Baochen Qiang
2026-04-22 14:23 ` Sebastian Andrzej Siewior [this message]
2026-04-22 18:12 ` Yu-Hsiang Tseng
2026-04-21 17:37 ` [PATCH] wifi: ath12k: fix false positive RCU warning " Yu-Hsiang Tseng
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=20260422142325.Glnd_2Zc@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=asas1asas200@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=clrkwllms@kernel.org \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_ramess@quicinc.com \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox