From: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
To: Nicolas Escande <nico.escande@gmail.com>, ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Subject: Re: [PATCH ath-current v2] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func()
Date: Fri, 14 Aug 2026 20:03:55 +0530 [thread overview]
Message-ID: <37c6a556-42ff-4f9d-9b95-d7f6b273e93b@oss.qualcomm.com> (raw)
In-Reply-To: <20260813-ath11k-locking-v2-1-f4113a0bd0f4@gmail.com>
On 8/13/2026 5:45 PM, Nicolas Escande wrote:
> In this function, we iterate over dp->reo_cmd_cache_flush_list using
> list_for_each_entry_safe(), under dp->reo_cmd_lock for concurrent access,
> and for each expired entries we :
> - drop the lock
> - call ath11k_dp_reo_cache_flush()
> - kfree() the entry
> - retake the lock to keep on iterating
>
> list_for_each_entry_safe() protects us from deleting the entry during
> iteration but doesn't protect for concurrent access. So another thread can
> take the lock and modify the list in between and crash like below.
>
> To fix the issue, move all entries that needs to be freed to a local list
> while under the lock and then iterate over the list to free the entries
> without holding the lock.
>
> BUG: Unable to handle kernel paging request at virtual address 00000010ddbeef8c
> Call trace:
> ath11k_dp_rx_tid_del_func+0x164/0x3c8
> ath11k_dp_process_reo_status+0x1d4/0x2fc
> ath11k_dp_service_srng+0x334/0x338
> ath11k_pcic_ext_grp_napi_poll+0x30/0xc0
> __napi_poll+0x34/0x184
> napi_threaded_poll+0xb4/0x1d8
> kthread+0xdc/0xe0
> ret_from_fork+0x10/0x20
>
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
>
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Suggested-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
next prev parent reply other threads:[~2026-08-14 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 12:15 [PATCH ath-current v2] wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func() Nicolas Escande
2026-08-14 14:33 ` Rameshkumar Sundaram [this message]
2026-08-17 2:15 ` Baochen Qiang
2026-09-09 17:57 ` Jeff Johnson
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=37c6a556-42ff-4f9d-9b95-d7f6b273e93b@oss.qualcomm.com \
--to=rameshkumar.sundaram@oss.qualcomm.com \
--cc=ath11k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nico.escande@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox