Re: [PATCH v2] wifi: ath11k/ath12k: release QMI handles on late init failures
Guangshuo Li <[email protected]> Sat, 18 Jul 2026 15:06:57 +0800
| Newsgroups | org.infradead.lists.ath11k,org.infradead.lists.ath12k,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless |
|---|---|
| Message-ID | <CANUHTR8DHt+dABWn1KmnCJNZhjY2NASqGwPp2SU7CSrhjhOe1g@mail.gmail.com> |
Hi Jeff, Thank you for the review. On Thu, 16 Jul 2026 at 08:59, Jeff Johnson <[email protected]> wrote: > > On 7/14/2026 11:40 PM, Guangshuo Li wrote: > > ath11k and ath12k initialize their QMI handles before allocating the QMI > > event workqueues and registering the service lookups. > > > > If either of these later initialization steps fails, the functions > > return without releasing the initialized QMI handles, leaking their > > resources. > > > > Release the QMI handles on the late failure paths in both drivers. > > > > ath12k_qmi_deinit_service() uses ab->qmi.ab to determine whether QMI > > service initialization completed successfully. Set it only after all > > initialization steps succeed. Keep the ath11k assignment unchanged > > because ath11k does not use it as an initialization-success guard. > > > > Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") > > Fixes: 088a099690e4 ("wifi: ath12k: fix error handling in creating hardware group") > > Signed-off-by: Guangshuo Li <[email protected]> > > --- > > v2: > > - Set ath12k ab->qmi.ab only after QMI service initialization succeeds, > > as suggested by Baochen Qiang. > > - Fix the same late initialization QMI handle leak in ath11k, as > > suggested by Vasanthakumar Thiagarajan. > > - Drop the Reviewed-by tag due to the code changes. > > > > drivers/net/wireless/ath/ath11k/qmi.c | 10 ++++++++-- > > drivers/net/wireless/ath/ath12k/qmi.c | 13 ++++++++++--- > > 2 files changed, 18 insertions(+), 5 deletions(-) > > Please split into two patches, one for ath11k and one for ath12k > I will split the ath11k and ath12k changes into two separate patches and send a v3 series. Best regards, Guangshuo