kexec-tools/0007-fadump-udev-do-not-re-register-fadump-if-kernel-hotp.patch
Lichen Liu 426b9269b8
Re apply upstream patches
We should use PatchXX to apply upstream kdump-utils
patches instead of directly merge them into git.

Resolves: RHEL-36415
Resolves: RHEL-37670
Upstream: https://github.com/rhkdump/kdump-utils/
Conflict: None

Signed-off-by: Lichen Liu <lichliu@redhat.com>
2024-06-11 11:05:24 +08:00

42 lines
1.6 KiB
Diff

From b4e3d3724cf372493b404586126067ff66e550d6 Mon Sep 17 00:00:00 2001
From: Sourabh Jain <sourabhjain@linux.ibm.com>
Date: Fri, 26 Apr 2024 18:17:49 +0530
Subject: [PATCH 7/7] fadump/udev: do not re-register fadump if kernel hotplug
ready
With the introduction of kernel commit c6c5b14dac0d ("powerpc: make fadump
resilient with memory add/remove events") linux kernel now internally manages
the update of elfcorehdr during memory add/remove events. So no need to
re-register fadump if the /sys/kernel/fadump/hotplug_ready is set to 1.
No impact for kernels that do not have /sys/kernel/fadump/hotplug_ready
sysfs.
Relevant kernel commit links:
1. https://msgid.link/20240422195932.1583833-2-sourabhjain@linux.ibm.com
2. https://msgid.link/20240422195932.1583833-3-sourabhjain@linux.ibm.com
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
98-kexec.rules.ppc64 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64
index e7735b3..85fe0b1 100644
--- a/98-kexec.rules.ppc64
+++ b/98-kexec.rules.ppc64
@@ -15,7 +15,9 @@ GOTO="kdump_reload_end"
LABEL="kdump_reload_mem"
-RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
+# Don't re-register fadump if /sys/kernel/fadump/hotplug_ready sysfs is set to 1.
+
+RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; ! test -f /sys/kernel/fadump/hotplug_ready || cat /sys/kernel/fadump/hotplug_ready | grep 1 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
GOTO="kdump_reload_end"
--
2.44.0