Hello community, here is the log from the commit of package libcpuset for openSUSE:Factory checked in at 2016-05-23 16:39:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcpuset (Old) and /work/SRC/openSUSE:Factory/.libcpuset.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcpuset" Changes: -------- --- /work/SRC/openSUSE:Factory/libcpuset/libcpuset.changes 2015-09-08 17:48:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libcpuset.new/libcpuset.changes 2016-05-23 16:39:17.000000000 +0200 @@ -1,0 +2,21 @@ +Fri May 20 09:39:06 UTC 2016 - [email protected] + +- Fix cpuset_pin()/cpuset_size()/cpuset_where() error handling (SUSE bnc#978841) + + In referenced bnc, the user had too many files open, which led to an + unhandled failure on the way to cpuset_equal_placement(), where it + happily segfaulted. Handle errors instead of simply ignoring them. + +- Patches added by this commit: + libcpuset-robustify-cpuset_pin-cpuset_size-cpuset_where-error-handling.diff + +------------------------------------------------------------------- +Fri May 20 07:20:57 UTC 2016 - [email protected] + +- Fix cpuset_pin()/cpuset_size()/cpuset_where() error handling (SUSE bnc#978841) + + In referenced bnc, the user had too many files open, which led to an + unhandled failure on the way to cpuset_equal_placement(), where it + happily segfaulted. Handle errors instead of simply ignoring them. + +------------------------------------------------------------------- New: ---- libcpuset-robustify-cpuset_pin-cpuset_size-cpuset_where-error-handling.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcpuset.spec ++++++ --- /var/tmp/diff_new_pack.3XrhPK/_old 2016-05-23 16:39:18.000000000 +0200 +++ /var/tmp/diff_new_pack.3XrhPK/_new 2016-05-23 16:39:18.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package libcpuset # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ Patch2: bug-514127_libcpuset-cpuset_set_iopt-adds.patch Patch3: libcpuset-agnostic-mountpoint.diff Patch4: libcpuset-handle-cgroup-mount.diff +Patch5: libcpuset-robustify-cpuset_pin-cpuset_size-cpuset_where-error-handling.diff BuildRequires: autoconf BuildRequires: automake BuildRequires: libbitmask-devel @@ -71,6 +72,7 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build sed -i -e 's@-Werror@@g' configure.in ++++++ libcpuset-robustify-cpuset_pin-cpuset_size-cpuset_where-error-handling.diff ++++++ Subject: Robustify cpuset_pin(), cpuset_size() and cpuset_where() error handling From: Mike Galbraith <[email protected]> Date: Fri May 20 08:54:25 CEST 2016 References: bnc#978841 In referenced bnc, the user had too many files open, which led to an unhandled failure on the way to cpuset_equal_placement(), where it segfaulted. Handle errors instead of simply ignoring them: Signed-off-by: Mike Galbraith <[email protected]> --- libcpuset.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) --- a/libcpuset.c +++ b/libcpuset.c @@ -3615,18 +3615,24 @@ int cpuset_pin(int relcpu) return -1; do { + r = -1; cpuset_free_placement(plc1); plc1 = cpuset_get_placement(0); + if (!plc1) + break; - r = 0; if (cpuset_unpin() < 0) - r = -1; + break; + cpu = cpuset_p_rel_to_sys_cpu(0, relcpu); - if (cpuset_cpubind(cpu) < 0) - r = -1; + if (cpu < 0 || cpuset_cpubind(cpu) < 0) + break; cpuset_free_placement(plc2); plc2 = cpuset_get_placement(0); + if (!plc2) + break; + r = 0; } while (!cpuset_equal_placement(plc1, plc2)); cpuset_free_placement(plc1); @@ -3644,13 +3650,20 @@ int cpuset_size() return -1; do { + r = -1; cpuset_free_placement(plc1); plc1 = cpuset_get_placement(0); + if (!plc1) + break; r = cpuset_cpus_weight(0); cpuset_free_placement(plc2); plc2 = cpuset_get_placement(0); + if (!plc2) { + r = -1; + break; + } } while (!cpuset_equal_placement(plc1, plc2)); cpuset_free_placement(plc1); @@ -3668,13 +3681,22 @@ int cpuset_where() return -1; do { + r = -1; cpuset_free_placement(plc1); plc1 = cpuset_get_placement(0); + if (!plc1) + break; r = cpuset_p_sys_to_rel_cpu(0, cpuset_latestcpu(0)); + if (r < 0) + break; cpuset_free_placement(plc2); plc2 = cpuset_get_placement(0); + if (!plc2) { + r = -1; + break; + } } while (!cpuset_equal_placement(plc1, plc2)); cpuset_free_placement(plc1);
