- Stop some mdmon segfaults (bz523860)

This commit is contained in:
Doug Ledford 2009-09-17 11:43:33 +00:00
parent e83588671c
commit c261edab2b
2 changed files with 18 additions and 1 deletions

12
mdadm-3.0-calloc.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up mdadm-3.0/mdmon.c~ mdadm-3.0/mdmon.c
--- mdadm-3.0/mdmon.c~ 2009-09-11 08:10:24.000000000 +0200
+++ mdadm-3.0/mdmon.c 2009-09-16 22:42:21.000000000 +0200
@@ -395,7 +395,7 @@ int mdmon(char *devname, int devnum, int
} else
pfd[0] = pfd[1] = -1;
- container = malloc(sizeof(*container));
+ container = calloc(1, sizeof(*container));
container->devnum = devnum;
container->devname = devname;
container->arrays = NULL;

View File

@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays) Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm Name: mdadm
Version: 3.0 Version: 3.0
Release: 3%{?dist} Release: 4%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-0.20090915git.tar.bz2 Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}-0.20090915git.tar.bz2
Source1: mdmonitor.init Source1: mdmonitor.init
Source2: raid-check Source2: raid-check
@ -11,6 +11,7 @@ Patch1: mdadm-2.5.2-static.patch
Patch2: mdadm-3.0-endian-FAIL.patch Patch2: mdadm-3.0-endian-FAIL.patch
Patch3: mdadm-3.0-metadata.patch Patch3: mdadm-3.0-metadata.patch
Patch4: mdadm-3.0-uuid.patch Patch4: mdadm-3.0-uuid.patch
Patch5: mdadm-3.0-calloc.patch
URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/ URL: http://www.kernel.org/pub/linux/utils/raid/mdadm/
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
@ -35,6 +36,7 @@ file can be used to help with some common tasks.
%patch2 -p1 -b .endian %patch2 -p1 -b .endian
%patch3 -p1 -b .metadata %patch3 -p1 -b .metadata
%patch4 -p1 -b .uuid %patch4 -p1 -b .uuid
%patch5 -p1 -b .calloc
%build %build
make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon make %{?_smp_mflags} CXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" SYSCONFDIR="%{_sysconfdir}" mdadm.static mdadm mdmon
@ -80,6 +82,9 @@ fi
%attr(0700,root,root) %dir /var/run/mdadm %attr(0700,root,root) %dir /var/run/mdadm
%changelog %changelog
* Thu Sep 17 2009 Doug Ledford <dledford@redhat.com> - 3.0-4
- Stop some mdmon segfaults (bz523860)
* Tue Sep 15 2009 Doug Ledford <dledford@redhat.com> - 3.0-3 * Tue Sep 15 2009 Doug Ledford <dledford@redhat.com> - 3.0-3
- Update to current head of upstream git repo for various imsm related fixes - Update to current head of upstream git repo for various imsm related fixes
(fixes bz523262) (fixes bz523262)