Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3754965pxk; Tue, 29 Sep 2020 05:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuLTFBUBLH11SHI/c0R+78WxQfkVxaDWMj5FG3HEpc0rcIiMwoDGqEr6ZfcqVYdrELra4Y X-Received: by 2002:a17:906:c18e:: with SMTP id g14mr3790699ejz.416.1601382937662; Tue, 29 Sep 2020 05:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601382937; cv=none; d=google.com; s=arc-20160816; b=F6aHtSR6os8GPK23xFFGoBWAiMnv/+XI8LkZBqJz9trQ+WNMiD+Ivo8Fv9DUkRXcJ6 CT6iIilvDCdM+6Jb0O18NowJOy59UHTZv1x3Oc3uBxSQa0brhFOxz+ErHtT3if1lihg1 h9hflGYJt6FfukfRTWBOhT0ikpXky8lJcSC6jwb0Iz1ix6+SE59orU2CXiQZBcv0l2ey 4RyuMJlMcwVbwb3buu4xi5+DLJTxpUDyvFYZbtXPensbqPwcAHxMOiyPMrxkT51srCev oqqY5Lz2Odmf7VyIej0AzrCTL21fX9LpakhwTPuluqQl+bZQ+cWXkXrpaqpq6vNl5ID+ l1HA== 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=S85LH2JsXD0iwdsiwsupjyyPsPw1lA11rv/XSCTpQzY=; b=D+AhYpqFkfOvfEruA4M9YFG49dU12QL96THnambII09bKCEJId0wrxACB5KXljJgKp yOjDosa/Gx744YreHgi3UWgq0Tn5NrZ/ajdOSuivBUBiAGGXYAxnBEfnmtl26OcvxXy1 Bb7iFqtaVoeWul8hvEiXKbKqOWC42+NCK6eJrBXpX/tn/i/BfcHQWhX+3oe35PuOC48M eDGdjsnO0iODw34o6USyySDgzpnGxWFbz1VZbBBeNE9zZhIMgi5lP47JTsv6n81oBzn5 GS7z+NFCWbtR69uu69dUXqd7SM/mdvwxEZ+rgrH565Zwwol93JpVSjwBO0pUvK2yjxif CZxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=In5jKHQF; 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 e20si2661993ejm.210.2020.09.29.05.35.14; Tue, 29 Sep 2020 05:35:37 -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=In5jKHQF; 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 S1732880AbgI2MeV (ORCPT + 99 others); Tue, 29 Sep 2020 08:34:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:36424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729672AbgI2LW5 (ORCPT ); Tue, 29 Sep 2020 07:22:57 -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 C25DC2158C; Tue, 29 Sep 2020 11:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601378435; bh=TFBY+Z38wtEk9WMdT39GZDD/7X9Gp3KLa48tdL5b0mE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=In5jKHQFvELdqjBDM4EdcIDT1O3EOJP/QS+4lkLiiHunhuQFh3K3hOdLd11nQp+bW ml6VyLI5i7ggGtU9z/BHneyzzJoUUO9PLp8novSCYfMyLMJ7V55O8QN5sUFyE57WlU wRmSBTYCxE5ppJk7vf+dTHmZ5yitfmPgqrc8OgCU= 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 4.19 005/245] ath10k: fix memory leak for tpc_stats_final Date: Tue, 29 Sep 2020 12:57:36 +0200 Message-Id: <20200929105947.252377992@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929105946.978650816@linuxfoundation.org> References: <20200929105946.978650816@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 aa333110eaba6..4e980e78ba95c 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -2365,6 +2365,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