summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: adf3887)
raw | patch | inline | side by side (parent: adf3887)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 23 Nov 2014 12:27:06 +0000 (13:27 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 23 Nov 2014 12:28:37 +0000 (13:28 +0100) |
Upstream fix for a segfault in the LVM plugin. Thanks to Bernd Zeimetz and
Marc Fournier for reporting this.
Closes: #747093
Marc Fournier for reporting this.
Closes: #747093
debian/changelog | patch | blob | history | |
debian/patches/00list | patch | blob | history | |
debian/patches/bts747093_lvm_segfault.dpatch | [new file with mode: 0755] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index eb58e134609896533ee169ee7c59639720fa0487..f192cfe5a715cef72646d67fe9c4b651530b15b0 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
- Added bts770681_riemann_ack: upstream fix for the write_riemann plugin
to avoid locking up a remote Riemann instance; thanks to Marc Fournier
for reporting this (Closes: #770681).
+ - Added bts747093_lvm_segfault: upstream fix for a segfault in the LVM
+ plugin; thanks to Bernd Zeimetz and Marc Fournier for reporting this
+ (Closes: #747093).
-- Sebastian Harl <tokkee@debian.org> Sun, 23 Nov 2014 13:04:03 +0100
diff --git a/debian/patches/00list b/debian/patches/00list
index 78e7f2d8c17edd217bec1c52fe8fc4dce9721031..f1f07e7581417a36c9e878480dd7dea7f76333fe 100644 (file)
--- a/debian/patches/00list
+++ b/debian/patches/00list
myplugin_api.dpatch
bts559801_plugin_find_fix.dpatch
bts770681_riemann_ack.dpatch
+bts747093_lvm_segfault.dpatch
diff --git a/debian/patches/bts747093_lvm_segfault.dpatch b/debian/patches/bts747093_lvm_segfault.dpatch
--- /dev/null
@@ -0,0 +1,26 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## DP: bts747093_lvm_segfault.dpatch by Jan Kundrát <jan.kundrat@cesnet.cz>
+## DP:
+## DP: lvm: Fix segfault when there are no logical volumes.
+## DP:
+## DP: Upstream bug report:
+## DP: https://github.com/collectd/collectd/pull/425
+
+@DPATCH@
+
+diff a/src/lvm.c b/src/lvm.c
+--- a/src/lvm.c
++++ b/src/lvm.c
+@@ -53,6 +53,11 @@ static int vg_read(vg_t vg, char const *vg_name)
+ lvm_submit (vg_name, "free", lvm_vg_get_free_size(vg));
+
+ lvs = lvm_vg_list_lvs(vg);
++ if (!lvs) {
++ /* no VGs are defined, which is not an error per se */
++ return (0);
++ }
++
+ dm_list_iterate_items(lvl, lvs) {
+ lvm_submit(vg_name, lvm_lv_get_name(lvl->lv), lvm_lv_get_size(lvl->lv));
+ }