Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3746072pxk; Tue, 29 Sep 2020 05:22:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxISzpFc21mfod8j072GfiUSuFAVKFMDLf+n1sxow3Hy2BVG6plZh1daM1JueB+5DbRhAjF X-Received: by 2002:a17:906:8245:: with SMTP id f5mr3378040ejx.264.1601382139665; Tue, 29 Sep 2020 05:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601382139; cv=none; d=google.com; s=arc-20160816; b=jkv5Tss6D/5AsmQOOyLqahmucNmjwPPr9LhDZfHFFo/cbXPqRZ0nP6TpHDda8jd5yH P2JjJKDezBSX9XWYmWQcbq3psdboKTcaGjlpe1Cskrt4FjwX+Eooa6mCO2vQ/59cfqVa dWgwoXmBBtt+SosHAYntieaXVgRlLKoh+6W6TPT2DMBCuyjoqTf21ybZbiM5aaz2R81m nDU3srGnIjsyustovjUoIVAUJe21dwEkY6ER+TUuhIb5xqc+ZTh9QWZ/bZTz5asoXOxq e/kO35OksWNxMTRk1Gp3cvnh4WcQHm+2i6GmKZETqZuyj2Qvy4b6d3BzCxvGGOjQvqa2 B9WA== 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=tm8M//Kys7fkMkW/qhSq0ayCNkyODh1zAaH+TFsg+ho=; b=IVZWiI/wlqouhZle6arMd4C/qZjGoAaDAxCjxDpUeOYR9xeut4Es4TFzxBTNdQtpKL IPifusRfkb1diXxFSbfJn8+mNVVGhQrGWqwersdAgGZC3XdrxS2bLgfVlZRUJN/cxR+z Zj9R0KhsyJUrF8CBrya5leLcrR/8DxzB6iHIq/1Yo+bLbO5zWmKdzzMz3UFPFbXxULY8 8WxsJJNvDezI32bp1AfLFpYJBABFyZ5fY9RmSGsSS+lRuA3WiSZ+cWXi904rIeBLm0be +wWKoA0bLX6lDCER1mFNJ5E3Ggi+u6pMML41mqdGaYnjB7OqSVKQsllbdLkzEhY2e17r OBYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hM40HNjQ; 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 b4si2570010edt.521.2020.09.29.05.21.57; Tue, 29 Sep 2020 05:22:19 -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=hM40HNjQ; 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 S1732404AbgI2MTB (ORCPT + 99 others); Tue, 29 Sep 2020 08:19:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:49122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729972AbgI2LgV (ORCPT ); Tue, 29 Sep 2020 07:36:21 -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 AAC7F23E23; Tue, 29 Sep 2020 11:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379093; bh=H8WaB6BrPJvOK0/+mDoNVBymGhqmdOHaFv38C5S0Xow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hM40HNjQcg03T2qojviegKp5Dd2nRIRn/cuSeomKqJYO7QnTm7rc5ncKqDQcsAy88 23GkN9NfmVFU3G4IpimMIjpMZWZH5Zsqs8wvvwgShSJKN+mOvzsniUY1C2DB6gapbM LaVsYTkySZKfMDk8GioBUTyBDLeCdqdLTlYq7wZ0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqing Pan , Kalle Valo , Sasha Levin Subject: [PATCH 5.4 011/388] ath10k: fix memory leak for tpc_stats_final Date: Tue, 29 Sep 2020 12:55:42 +0200 Message-Id: <20200929110011.033121168@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@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: Miaoqing Pan [ Upstream commit 486a8849843455298d49e694cca9968336ce2327 ] The memory of ar->debug.tpc_stats_final is reallocated every debugfs reading, it should be freed in ath10k_debug_destroy() for the last allocation. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 40baf25ac99f3..04c50a26a4f47 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2532,6 +2532,7 @@ void ath10k_debug_destroy(struct ath10k *ar) ath10k_debug_fw_stats_reset(ar); kfree(ar->debug.tpc_stats); + kfree(ar->debug.tpc_stats_final); } int ath10k_debug_register(struct ath10k *ar) -- 2.25.1