From patchwork Tue Oct 27 13:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312088 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 0FFF0C4363A for ; Tue, 27 Oct 2020 17:21:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2D9221D24 for ; Tue, 27 Oct 2020 17:21:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603819291; bh=47XuXRUE5rmrBFlPABf4wvzHJhnotZEIQYbipEI3bKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qosUcc18ZQjB3W2R9dIM27CqBtihskqgU7ry/YgR3yEYj9wqQdwrkDlkAM0jX2h97 VrJUFXlwQiGwKwAFfgeYNGpfXJJZo/Q4yZxbnlQsOUGBe2msSRTBTKfR/NZjkHmKOJ /RrQy/EO6hcGx67XJuQsorAGOETLz1qiIlBvsd7A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1818025AbgJ0RQ5 (ORCPT ); Tue, 27 Oct 2020 13:16:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:56078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766369AbgJ0Oz3 (ORCPT ); Tue, 27 Oct 2020 10:55:29 -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 AC53822284; Tue, 27 Oct 2020 14:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810519; bh=47XuXRUE5rmrBFlPABf4wvzHJhnotZEIQYbipEI3bKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VGvsxrMfYILLLIYtFOwM1ME7Wi/YIlTJ7gdF4RVlzO0Ypd1ice9Rq7qhK2MccQUXf d8qXOpf1xLiyoAV5yusAp5OUd7JXQvQM3d/d7FF5opn1sGv0hnKN9JSAqiE60eAWuy +hBUBb5eyb6HxwUgOWHX2NE5965QxrdC5pIbBBDU= 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.8 167/633] ath11k: Fix possible memleak in ath11k_qmi_init_service Date: Tue, 27 Oct 2020 14:48:30 +0100 Message-Id: <20201027135530.504494846@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@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; }