Resolves: bz1080421

This commit is contained in:
Petr Holasek 2014-07-31 15:57:06 +02:00
parent e1255466db
commit 0bca0ad2b5
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,15 @@
diff -up numactl-2.0.9/numactl.c.orig numactl-2.0.9/numactl.c
--- numactl-2.0.9/numactl.c.orig 2014-07-31 15:42:21.474060364 +0200
+++ numactl-2.0.9/numactl.c 2014-07-31 15:42:32.894085763 +0200
@@ -242,6 +242,11 @@ void hardware(void)
int prevnode=-1;
int skip=0;
int maxnode = numa_max_node();
+
+ if (numa_available() < 0) {
+ printf("No NUMA available on this system\n");
+ exit(1);
+ }
for (i=0; i<=maxnode; i++)
if (numa_bitmask_isbitset(numa_nodes_ptr, i))

View File

@ -1,7 +1,7 @@
Name: numactl Name: numactl
Summary: Library for tuning for Non Uniform Memory Access machines Summary: Library for tuning for Non Uniform Memory Access machines
Version: 2.0.9 Version: 2.0.9
Release: 1%{dist} Release: 2%{dist}
# libnuma is LGPLv2 and GPLv2 # libnuma is LGPLv2 and GPLv2
# numactl binaries are GPLv2 only # numactl binaries are GPLv2 only
License: GPLv2 License: GPLv2
@ -12,6 +12,8 @@ Buildroot: %{_tmppath}/%{name}-buildroot
ExcludeArch: s390 s390x %{arm} ExcludeArch: s390 s390x %{arm}
Patch1: numactl-2.0.9-hw-check-segfault.patch
%description %description
Simple NUMA policy support. It consists of a numactl program to run Simple NUMA policy support. It consists of a numactl program to run
other programs with a specific NUMA policy. other programs with a specific NUMA policy.
@ -37,6 +39,7 @@ Provides development headers for numa library calls
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch1 -p1
%build %build
make clean make clean
@ -85,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3* %{_mandir}/man3/*.3*
%changelog %changelog
* Thu Jul 31 2014 Petr Holasek <pholasek@redhat.com> 2.0.9-2
- fixed segfault on non-NUMA systems (bz1080421)
* Wed Oct 09 2013 Petr Holasek <pholasek@redhat.com> 2.0.9-1 * Wed Oct 09 2013 Petr Holasek <pholasek@redhat.com> 2.0.9-1
- rebased to version 2.0.9 - rebased to version 2.0.9