Accepting request 284795 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/284795 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/powertop?expand=0&rev=37
This commit is contained in:
commit
a30f8f7c5e
48
powertop-fix-crash-with-autotune.patch
Normal file
48
powertop-fix-crash-with-autotune.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 6fd9ecebd3bc277bd91ce057f85f8e54b09bb0a9 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Mullin <masmullin@hush.com>
|
||||
Date: Thu, 22 Jan 2015 16:50:10 -0500
|
||||
Subject: [PATCH] Powertop crashes with 'powertop --auto-tune'
|
||||
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
Please see the following patch to address the reported crash
|
||||
- ---
|
||||
- From e994a414f619410877023fce35ade12d1cfce68d Mon Sep 17 00:00:00 2001
|
||||
From: Michael Mullin <masmullin@hush.com>
|
||||
Date: Thu, 22 Jan 2015 16:33:31 -0500
|
||||
Subject: [PATCH] If "dir" is closed early inside create_add_devfreq_devices()
|
||||
then there is a potential double free due to a second close during the
|
||||
cleanup phase in clear_all_devfreq()
|
||||
|
||||
Signed-off-by: Michael Mullin <masmullin@hush.com>
|
||||
|
||||
- ---
|
||||
src/devices/devfreq.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
---
|
||||
src/devices/devfreq.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/devices/devfreq.cpp b/src/devices/devfreq.cpp
|
||||
index d2e56e3..f652a57 100644
|
||||
--- a/src/devices/devfreq.cpp
|
||||
+++ b/src/devices/devfreq.cpp
|
||||
@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void)
|
||||
fprintf(stderr, "Devfreq not enabled\n");
|
||||
is_enabled = false;
|
||||
closedir(dir);
|
||||
+ dir = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -327,6 +328,8 @@ void clear_all_devfreq()
|
||||
}
|
||||
all_devfreq.clear();
|
||||
/* close /sys/class/devfreq */
|
||||
- if (dir != NULL)
|
||||
+ if (dir != NULL) {
|
||||
closedir(dir);
|
||||
+ dir = NULL;
|
||||
+ }
|
||||
}
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 8 22:02:17 UTC 2015 - p.drouand@gmail.com
|
||||
|
||||
- Add powertop-fix-crash-with-autotune.patch; Powertop crashes with
|
||||
'powertop --auto-tune' (fix bnc#915690)
|
||||
- Split out translation files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 16 20:05:20 UTC 2014 - p.drouand@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package powertop
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -26,6 +26,7 @@ Version: 2.7
|
||||
Release: 0
|
||||
Source: https://01.org/sites/default/files/downloads/%name/%name-%version.tar.gz
|
||||
Patch2: powertop-1.98-always-create-params.patch
|
||||
Patch3: powertop-fix-crash-with-autotune.patch
|
||||
Patch5: powertop-no-date.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gettext
|
||||
@ -36,6 +37,7 @@ BuildRequires: pkgconfig(libnl-3.0)
|
||||
BuildRequires: pkgconfig(libnl-genl-3.0)
|
||||
BuildRequires: pkgconfig(libpci)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Recommends: %{name}-lang
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -43,9 +45,12 @@ PowerTOP is a program that collects the various pieces of information
|
||||
from your system and presents an overview of how well your laptop is
|
||||
doing in terms of power savings.
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch5 -p1
|
||||
|
||||
# Delete objects files left in tarball
|
||||
@ -66,7 +71,7 @@ touch %{buildroot}%{_localstatedir}/cache/powertop/{saved_parameters.powertop,sa
|
||||
touch %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
||||
touch %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||
|
||||
%files -f %name.lang
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING README
|
||||
%dir %{_localstatedir}/cache/powertop
|
||||
@ -75,4 +80,6 @@ touch %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||
%_sbindir/%name
|
||||
%{_mandir}/man8/powertop.8.gz
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user