diff --git a/kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch b/kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch new file mode 100644 index 0000000..2362ce0 --- /dev/null +++ b/kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch @@ -0,0 +1,34 @@ +From: Petr Tesarik +Date: Mon Jun 26 14:10:33 2017 +0200 +Subject: Do not reload on CPU/memory hotplug when using FADUMP +References: bsc#1040567 +Upstream: v0.8.17 +Git-commit: c00516e1cb4f0679f38099880726154a507673ec + +Core headers are only used with kexec-based kdump, not with FADUMP. +The whole udev rule can be skipped when using FADUMP. + +Signed-off-by: Petr Tesarik + +diff --git a/70-kdump.rules.in b/70-kdump.rules.in +index 6980c7e..bccb341 100644 +--- a/70-kdump.rules.in ++++ b/70-kdump.rules.in +@@ -5,12 +5,16 @@ + # + @else + # +-# Kdump core headers needs to be regnerated if the CPUs or memory changes. ++# Kdump core headers need to be regenerated if the CPUs or memory changes. + # For this, reload kdump. + # + # Novell Bug #389658 + # + ++@if @ARCH@ ppc ppc64 ppc64le ++TEST="/sys/kernel/fadump_registered", PROGRAM="/bin/cat /sys/kernel/fadump_registered", RESULT=="1", GOTO="kdump_end" ++@endif ++ + SUBSYSTEM=="memory", ACTION=="add|remove", GOTO="kdump_try_restart" + @if @ARCH@ ppc ppc64 ppc64le + SUBSYSTEM=="cpu", ACTION=="online|offline", GOTO="kdump_try_restart" diff --git a/kdump-fail-if-fadump-cannot-be-registered.patch b/kdump-fail-if-fadump-cannot-be-registered.patch new file mode 100644 index 0000000..c7514f7 --- /dev/null +++ b/kdump-fail-if-fadump-cannot-be-registered.patch @@ -0,0 +1,40 @@ +From: Petr Tesarik +Date: Mon Jun 26 13:22:10 2017 +0200 +Subject: Fail at startup if fadump cannot be registered +References: bsc#1040567 +Upstream: v0.8.17 +Git-commit: 99a38e490012da75d83efb83385d42edbea100e9 + +If writing "1" into /sys/kernel/fadump_registered fails for whatever +reason, do not return success. + +Signed-off-by: Petr Tesarik + +diff --git a/init/load.sh b/init/load.sh +index 1894551..4fc7a82 100755 +--- a/init/load.sh ++++ b/init/load.sh +@@ -241,17 +241,19 @@ function load_kdump_fadump() + fi + + local msg ++ local result=0 + + # The kernel fails with EINVAL if registered already + # (see bnc#814780) +- if [ $(cat "$FADUMP_REGISTERED") != "1" ] ; then +- local output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1) +- local result=$? ++ if [ "$(cat $FADUMP_REGISTERED)" != "1" ] ; then ++ local output + +- if [ $result -eq 0 ] ; then ++ output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1) ++ if [ $? -eq 0 ] ; then + msg="Registered fadump" + else + msg="FAILED to register fadump: $output" ++ result=1 + fi + else + msg="fadump is already registered" diff --git a/kdump.changes b/kdump.changes index 0ab8d6b..66ff514 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jun 26 11:24:47 UTC 2017 - ptesarik@suse.com + +- kdump-fail-if-fadump-cannot-be-registered.patch: Fail at startup + if fadump cannot be registered (bsc#1040567). +- kdump-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch: Do not + reload on CPU/memory hotplug when using FADUMP (bsc#1040567). + ------------------------------------------------------------------- Fri Jun 23 12:56:45 UTC 2017 - ptesarik@suse.com diff --git a/kdump.spec b/kdump.spec index 8bec038..4f65e34 100644 --- a/kdump.spec +++ b/kdump.spec @@ -65,6 +65,8 @@ Patch20: %{name}-move-class-SystemCPU-to-header-file.patch Patch21: %{name}-treat-KDUMP_CPUS-0-as-all-available-CPUs.patch Patch22: %{name}-multithreading-by-default.patch Patch23: %{name}-explicitly-request-zFCP-devices.patch +Patch24: %{name}-fail-if-fadump-cannot-be-registered.patch +Patch25: %{name}-do-not-reload-FADUMP-on-CPU-memory-hotplug.patch BuildRequires: asciidoc BuildRequires: cmake BuildRequires: gcc-c++ @@ -148,6 +150,8 @@ cp %{S:1} tests/data/ %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 +%patch25 -p1 %build export CFLAGS="%{optflags}"