From patchwork Tue Oct 27 13:47:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 289670 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7111EC8301F for ; Tue, 27 Oct 2020 15:43:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25F9822265 for ; Tue, 27 Oct 2020 15:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813418; bh=47XuXRUE5rmrBFlPABf4wvzHJhnotZEIQYbipEI3bKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=EpGIexFssQ8yFP/c+vpm1uDvNm7dIhtzAf61Y/dp0+UTGoX1z6ErgxS4tj6v/x0R2 0i+AhyDKToyiSJtI4T+6ZSFMdLsUqNr9mcAQoWa4oy/ZCvJzTQvFJAwlQ8IHeuOuZp 92IvAVrEjemhquSvyfoxJKxeUc4A7T39raN/mAj0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1798606AbgJ0P3M (ORCPT ); Tue, 27 Oct 2020 11:29:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:41284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1798223AbgJ0P0l (ORCPT ); Tue, 27 Oct 2020 11:26:41 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A332E2064B; Tue, 27 Oct 2020 15:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812401; bh=47XuXRUE5rmrBFlPABf4wvzHJhnotZEIQYbipEI3bKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UjqRE9AxubwzSz/YC4duo4fNBUkHa5i3Gy1815xK0R5lvt5ybI+s4/eo3CQwlP8Yf /HPf0Z/0I9sYnz9Ekx8hvwrNEwa4cit7k0NDTpudrBAXJRseJxMqMweQi4MvUUJqOd zvRxwui/lfVBSf6+FHrzop2pTzV0ntO21wwrgc+0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Yufen , Kalle Valo , Sasha Levin Subject: [PATCH 5.9 196/757] ath11k: Fix possible memleak in ath11k_qmi_init_service Date: Tue, 27 Oct 2020 14:47:26 +0100 Message-Id: <20201027135459.805356901@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Wang Yufen [ Upstream commit 28f1632118818d9dccabf4c0fccfe49686742317 ] When qmi_add_lookup fail, we should destroy the workqueue Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Reported-by: Hulk Robot Signed-off-by: Wang Yufen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1595237804-66297-1-git-send-email-wangyufen@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/qmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c index c00a99ad8dbc1..497cff7e64cc5 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.c +++ b/drivers/net/wireless/ath/ath11k/qmi.c @@ -2419,6 +2419,7 @@ int ath11k_qmi_init_service(struct ath11k_base *ab) ATH11K_QMI_WLFW_SERVICE_INS_ID_V01); if (ret < 0) { ath11k_warn(ab, "failed to add qmi lookup\n"); + destroy_workqueue(ab->qmi.event_wq); return ret; }