dlm_controld: fix uninitialized mem for fence_all config

This commit is contained in:
David Teigland 2012-08-16 12:33:49 -05:00
parent 2aa4a989d7
commit 311152f827
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 5e069a534379611e08714ac81870af6b387a4038 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Thu, 16 Aug 2012 11:29:43 -0500
Subject: [PATCH] dlm_controld: fix uninitialized mem for fence_all config
If the fence_all config option is used, this could cause
unfencing to be used when it shouldn't, which could cause
startup to fail.
Signed-off-by: David Teigland <teigland@redhat.com>
---
dlm_controld/fence_config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlm_controld/fence_config.c b/dlm_controld/fence_config.c
index 66a1ad6..5d8d7dc 100644
--- a/dlm_controld/fence_config.c
+++ b/dlm_controld/fence_config.c
@@ -251,6 +251,7 @@ int fence_config_init(struct fence_config *fc, unsigned int nodeid, char *path)
rv = -ENOMEM;
goto out;
}
+ memset(dev, 0, sizeof(struct fence_device));
rv = sscanf(line, "%s %s %[^\n]s\n", dev->name, dev->agent, dev->args);
if (rv < 2) {
--
1.7.10.1.362.g242cab3

View File

@ -1,6 +1,6 @@
Name: dlm
Version: 3.99.5
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2 and GPLv2+ and LGPLv2+
# For a breakdown of the licensing, see README.license
Group: System Environment/Kernel
@ -13,6 +13,8 @@ BuildRequires: libxml2-devel
BuildRequires: systemd-units
Source0: http://people.redhat.com/teigland/%{name}-%{version}.tar.gz
Patch0: 0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
%if 0%{?rhel}
ExclusiveArch: i686 x86_64
%endif
@ -30,6 +32,7 @@ The kernel dlm requires a user daemon to control cluster membership.
%prep
%setup -q
%patch0 -p1 -b .0001-dlm_controld-fix-uninitialized-mem-for-fence_all-con.patch
%build
# upstream does not require configure
@ -109,6 +112,9 @@ developing applications that use %{name}.
%{_libdir}/pkgconfig/*.pc
%changelog
* Thu Aug 16 2012 David Teigland <teigland@redhat.com> - 3.99.5-3
- dlm_controld: fix uninitialized mem for fence_all config
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.99.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild