Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (73fa1cfa2715dc74ebc87a24a5e193c1aeb8aa16)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (73fa1cfa2715dc74ebc87a24a5e193c1aeb8aa16)
  • Date: Sat, 25 Dec 2021 19:33:18 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

utils/cpufrequtils/DETAILS | 1
utils/cpufrequtils/HISTORY | 6 +
utils/cpufrequtils/PRE_BUILD | 13 ++-
utils/cpufrequtils/patches/0001-Fix-NULL-pointer-dereference.patch | 34
++++++++++
4 files changed, 49 insertions(+), 5 deletions(-)

New commits:
commit 73fa1cfa2715dc74ebc87a24a5e193c1aeb8aa16
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

cpufrequtils: Add NULL pointer deref bugfix

Almost forgotten patch; sent in 2013 to the maintainer, but the project
seems abandoned.

commit 39696fcac1fb8d4ead90dcbb4f95baaf91a5d6dc
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

cpufrequtils: Merge Makefile edits

diff --git a/utils/cpufrequtils/DETAILS b/utils/cpufrequtils/DETAILS
index 1a1bcfb..f992436 100755
--- a/utils/cpufrequtils/DETAILS
+++ b/utils/cpufrequtils/DETAILS
@@ -1,5 +1,6 @@
SPELL=cpufrequtils
VERSION=008
+ PATCHLEVEL=1
SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE2=$SOURCE.sign
SOURCE_URL=$KERNEL_URL/pub/linux/utils/kernel/cpufreq/$SOURCE
diff --git a/utils/cpufrequtils/HISTORY b/utils/cpufrequtils/HISTORY
index 2a98154..17f5cb0 100644
--- a/utils/cpufrequtils/HISTORY
+++ b/utils/cpufrequtils/HISTORY
@@ -1,3 +1,9 @@
+2021-12-25 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD: merged Makefile edits
+ * patches/0001-Fix-NULL-pointer-dereference.patch:
+ added pointer deref bugfix
+ * DETAILS: PATCHLEVEL++
+
2011-05-13 Peng Chang (Charles) <chp AT sourcemage.org>
* PRE_BUILD: cp -p doesn't work with castfs, and it's not necessary

diff --git a/utils/cpufrequtils/PRE_BUILD b/utils/cpufrequtils/PRE_BUILD
index 7b67210..edb7569 100755
--- a/utils/cpufrequtils/PRE_BUILD
+++ b/utils/cpufrequtils/PRE_BUILD
@@ -1,5 +1,8 @@
-default_pre_build &&
-cd $SOURCE_DIRECTORY &&
-sedit "s:DESTDIR ?=:DESTDIR ?= $INSTALL_ROOT:" Makefile &&
-sedit "s:/usr/man:/usr/share/man:" Makefile &&
-sedit "s:cp -fpR:cp -fR:" Makefile
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
+sedit '
+ s:^DESTDIR ?=:DESTDIR ?= $INSTALL_ROOT:
+ s:/usr/man:/usr/share/man:
+ s:cp -fpR:cp -fR:
+' Makefile
diff --git
a/utils/cpufrequtils/patches/0001-Fix-NULL-pointer-dereference.patch
b/utils/cpufrequtils/patches/0001-Fix-NULL-pointer-dereference.patch
new file mode 100644
index 0000000..15ddb2b
--- /dev/null
+++ b/utils/cpufrequtils/patches/0001-Fix-NULL-pointer-dereference.patch
@@ -0,0 +1,34 @@
+From 2a0bb5b2663f1bdf6b9c7ad0e3134003c65903ab Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael.luceno AT gmail.com>
+Date: Sun, 5 May 2013 20:14:24 -0300
+Subject: [PATCH] Fix NULL pointer dereference
+
+When cpufreq is not available, cpufreq_get_related_cpus returns NULL.
+
+Signed-off-by: Ismael Luceno <ismael.luceno AT gmail.com>
+---
+ utils/set.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/utils/set.c b/utils/set.c
+index bfca465..5b51da1 100644
+--- a/utils/set.c
++++ b/utils/set.c
+@@ -357,8 +357,12 @@ int main(int argc, char **argv)
+ if (!cpus)
+ cpus = &single_cpu;
+
+- if (related)
+- cpus = cpufreq_get_related_cpus(cpus->cpu);
++ if (related) {
++ struct cpufreq_affected_cpus *tmp;
++ tmp = cpufreq_get_related_cpus(cpus->cpu);
++ if (tmp)
++ cpus = tmp;
++ }
+
+ /* loop over CPUs */
+ while (1) {
+--
+1.8.2.1
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (73fa1cfa2715dc74ebc87a24a5e193c1aeb8aa16), Ismael Luceno, 12/25/2021

Archive powered by MHonArc 2.6.24.

Top of Page