Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp499308pxx; Wed, 28 Oct 2020 09:42:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV6XLFzsCWZTBXCXtBXTarPgoeQNn+cW4u6ikRdCg4qVTeSIPcivyB60yon2B3+w6TCGWX X-Received: by 2002:a17:906:4b0f:: with SMTP id y15mr8132169eju.198.1603903347615; Wed, 28 Oct 2020 09:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603903347; cv=none; d=google.com; s=arc-20160816; b=zjGnakGQ2emyPb63koE+H/Ue9DuHKFpsz67QrL1rA1bZxzmawL3ME9Fzw9wQ3LMQGO DqSLyyjtRWD8zKoeijr2rH1pujfZcfsa17yrWVmeuHUFmazsrbYKpvBL+5Rao6COq1pR oeDe9+m4g93YPJGcVTrWXuxsCvAi7cfoWkip3A2EKO0eE8PckNanYZCctsEhkZ7Ijyrz c2xAuc7L0WoQUTunhVKi3EJ6NtZC7Fs/T2zRvRexzeKc3RlEk3LadHTAMh1I+Clb4T9F F0rio9DxGrktLiPaPzv0MtJ017MdofENtZe7qtcSUQ+B/s2BbHsXEeF8919wU8YzWixy 6D8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tdg+AKdeKAqjL1t14XBMA45FG+aKW03+34dhGGu71hg=; b=HagNiEzOospiF12XhCp4BUkKUjmknlQuwJEPTmJb/C2JowQ+Ra54D4k7l94+c+rByv NVYpciNQ2T2dp0puvHruXocmSOtnf7u46sebQczkdmsCIX7dNfBput+8OkKhrMLyvgnX /kIDooyhhzRD/sc5NZFuWrjwa+hRNxr6fCBEALTt/RIhyX8rNzYC3TTMj/RnPjCVrkr/ xGPwNTjCmz7HjkeHjaXi17XtVr/9915AFRbnhDKhCwcedyTlCcZRsbybSJMDKi3DBfTC Vjc4HvX8lbGkmpK44FFbTR21KKflyYxu3qE8jBjDRd0Gu+K/jiCWWHO8jUdeqM9SlgJ5 GjvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VGvsxrMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3617587eja.436.2020.10.28.09.42.01; Wed, 28 Oct 2020 09:42:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VGvsxrMf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1818247AbgJ0RSc (ORCPT + 99 others); Tue, 27 Oct 2020 13:18:32 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; } -- 2.25.1