lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1A7043D5F58CCB44A599DFD55ED4C9486D97C3FA@FMSMSX125.amr.corp.intel.com>
Date:   Thu, 5 Sep 2019 17:00:30 +0000
From:   "Brown, Len" <len.brown@...el.com>
To:     Sasha Levin <sashal@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
CC:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Prarit Bhargava <prarit@...hat.com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>
Subject: RE: [PATCH AUTOSEL 5.2 82/94] tools/power turbostat: fix file
 descriptor leaks

FWIW,

The latest turbostat and x86_energy_perf_policy utilities in the upstream kernel tree should always be backward compatible with all old kernels.  If that is EVER not the case, I want to know about it.

Yes, I know that some distros ship old versions of these utilities built out of their matching kernel tree snapshots.
Yes, applying upstream fixes to .stable for such distros is a good thing.

However, the better solution for these particular utilities, is that they simply always use upstream utilities -- even with old kernels.

When somebody reports a problem and I need them to run these tools, 100% of the time, I start by sending them the latest upstream version to replace the old version shipped by the distro.

Cheers,
-Len



-----Original Message-----
From: Sasha Levin [mailto:sashal@...nel.org] 
Sent: Wednesday, September 04, 2019 11:57 AM
To: linux-kernel@...r.kernel.org; stable@...r.kernel.org
Cc: Gustavo A. R. Silva <gustavo@...eddedor.com>; Prarit Bhargava <prarit@...hat.com>; Brown, Len <len.brown@...el.com>; Sasha Levin <sashal@...nel.org>; linux-pm@...r.kernel.org
Subject: [PATCH AUTOSEL 5.2 82/94] tools/power turbostat: fix file descriptor leaks

From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>

[ Upstream commit 605736c6929d541c78a85dffae4d33a23b6b2149 ]

Fix file descriptor leaks by closing fp before return.

Addresses-Coverity-ID: 1444591 ("Resource leak")
Addresses-Coverity-ID: 1444592 ("Resource leak")
Fixes: 5ea7647b333f ("tools/power turbostat: Warn on bad ACPI LPIT data")
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Reviewed-by: Prarit Bhargava <prarit@...hat.com>
Signed-off-by: Len Brown <len.brown@...el.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 tools/power/x86/turbostat/turbostat.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 71a931813de00..066bd43ed6c9f 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -2912,6 +2912,7 @@ int snapshot_cpu_lpi_us(void)
 	if (retval != 1) {
 		fprintf(stderr, "Disabling Low Power Idle CPU output\n");
 		BIC_NOT_PRESENT(BIC_CPU_LPI);
+		fclose(fp);
 		return -1;
 	}
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ