[irqbalance/f20] Resolves: bz1095915
Petr Holasek
pholasek at fedoraproject.org
Thu May 8 21:39:37 UTC 2014
commit 2af1d0078c7989a95e0bdf27e8e4f7acc2d3d1a6
Author: Petr Holasek <pholasek at redhat.com>
Date: Thu May 8 23:25:03 2014 +0200
Resolves: bz1095915
Conflicts:
irqbalance.spec
irqbalance-1.0.7-nopcidevs_memleak.patch | 35 ++++++++++++++++++++++++++++++
irqbalance.spec | 7 +++++-
2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/irqbalance-1.0.7-nopcidevs_memleak.patch b/irqbalance-1.0.7-nopcidevs_memleak.patch
new file mode 100644
index 0000000..4873e05
--- /dev/null
+++ b/irqbalance-1.0.7-nopcidevs_memleak.patch
@@ -0,0 +1,35 @@
+commit 699deffdd881bf4759f3fcc4d6ee3e018e4c266e
+Author: Tom Li <biergaizi2009 at gmail.com>
+Date: Fri Apr 18 20:06:18 2014 -0400
+
+ fix memory leak in classify code
+
+ If a system has no pci devices the opening of the pci bus directory in
+ rebuild_irq_db will fail, leading to a memory leak. Fix it by freeing the list
+ we create in that function always on exit
+
+ Reported-by: Tom Li <biergaizi2009 at gmail.com>
+ Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
+ Signed-off-by: Tom Li <biergaizi2009 at gmail.com>
+
+diff --git a/classify.c b/classify.c
+index 1867a94..94b53b8 100644
+--- a/classify.c
++++ b/classify.c
+@@ -465,7 +465,7 @@ void rebuild_irq_db(void)
+
+ devdir = opendir(SYSDEV_DIR);
+ if (!devdir)
+- return;
++ goto free;
+
+ do {
+ entry = readdir(devdir);
+@@ -482,6 +482,7 @@ void rebuild_irq_db(void)
+
+ for_each_irq(tmp_irqs, add_missing_irq, NULL);
+
++free:
+ g_list_free_full(tmp_irqs, free);
+
+ }
diff --git a/irqbalance.spec b/irqbalance.spec
index 0059fa4..0884ae8 100644
--- a/irqbalance.spec
+++ b/irqbalance.spec
@@ -1,6 +1,6 @@
Name: irqbalance
Version: 1.0.7
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 2
Summary: IRQ balancing daemon
@@ -23,6 +23,7 @@ Requires: numactl-libs
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm}
Patch1: irqbalance-1.0.4-env-file-path.patch
+Patch2: irqbalance-1.0.7-nopcidevs_memleak.patch
%description
irqbalance is a daemon that evenly distributes IRQ load across
@@ -31,6 +32,7 @@ multiple CPUs for enhanced performance.
%prep
%setup -q
%patch1 -p1
+%patch2 -p1
%build
%configure
@@ -67,6 +69,9 @@ fi
/sbin/chkconfig --del irqbalance >/dev/null 2>&1 || :
%changelog
+* Thu May 08 2014 Petr Holasek <pholasek at redhat.com> - 2:1.0.7-2
+- Fixed memory leak (bz1095915)
+
* Fri Oct 11 2013 Petr Holasek <pholasek at redhat.com> - 2:1.0.7-1
- Rebased to version 1.0.7
More information about the scm-commits
mailing list