[PATCH] wifi: ath12k: fix channel list double-free on error paths

Jeff Johnson jeff.johnson at oss.qualcomm.com
Fri Aug 7 08:48:41 PDT 2026


On 8/6/2026 7:56 PM, Linkai Gong wrote:
> On Thu, Aug 06, 2026 at 18:47:38 -0700, Jeff Johnson wrote:
>> https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath12k/submittingpatches.html#tested-on-tag
>> Tested-on: tag missing. How was this tested?
> 
> Thanks for the review.
> 
> This issue was found by code review of the error paths in
> ath12k_mac_setup_channels_rates(). I do not have QCN9274/WCN7850
> hardware, so I could not provide a Tested-on tag or reproduce the
> ENOMEM double-free on a device.
> 
> The bug is: after kfree() of sbands[].channels on failure, the
> pointer is left non-NULL (or the wrong band is cleared), and
> ath12k_mac_cleanup_unregister() frees it again.
> 
> I understand Tested-on is required for ath12k. I will follow up
> with a v2 including Tested-on once I can test on QCN9274/WCN7850
> hardware. Meanwhile, any Tested-by from someone with the hardware
> would be appreciated.
It is OK to specify the patch was compiled tested only. I just need that as
part of the commit text so that the level of testing is documented.

The ath10k documentation was clear about this:
For trivial patches it’s ok to skip Tested-on tag but then it should say
“Compile tested only”.

Not sure why that was dropped as part of the ath11k and ath12k documentation
(that predates me becoming a maintainer).

/jeff



More information about the ath12k mailing list