kdump-utils/0001-powerpc-fix-early-exit-from-udev-on-hotplug-event-fo.patch
Pingfan Liu b0d6e9f357 powerpc: fix early exit from udev on hotplug event for fadump
Resolves: https://issues.redhat.com/browse/RHEL-24543
Upstream: kdump-utils

Author: Sourabh Jain <sourabhjain@linux.ibm.com>
Date:   Wed Jan 8 12:11:10 2025 +0530

    powerpc: fix early exit from udev on hotplug event for fadump

    Sysfs /sys/kernel/fadump/hotplug_ready contains 1 if hotplug is
    supported by fadump.

    Now to exit early the RUN command should grep 0 from
    /sys/kernel/fadump/hotplug_ready instead of 1.

    Fix it by updating RUN command.

    Fixes: b4e3d3724cf3 ("fadump/udev: do not re-register fadump if kernel hotplug ready")
    Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>

Signed-off-by: Pingfan Liu <piliu@redhat.com>
2025-01-13 10:01:22 +08:00

36 lines
1.5 KiB
Diff

From 679a1c5a96e4b5fac06f2045db97db21e6a62ff8 Mon Sep 17 00:00:00 2001
From: Sourabh Jain <sourabhjain@linux.ibm.com>
Date: Wed, 8 Jan 2025 12:11:10 +0530
Subject: [PATCH] powerpc: fix early exit from udev on hotplug event for fadump
Sysfs /sys/kernel/fadump/hotplug_ready contains 1 if hotplug is
supported by fadump.
Now to exit early the RUN command should grep 0 from
/sys/kernel/fadump/hotplug_ready instead of 1.
Fix it by updating RUN command.
Fixes: b4e3d3724cf3 ("fadump/udev: do not re-register fadump if kernel hotplug ready")
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
---
98-kexec.rules.ppc64 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/98-kexec.rules.ppc64 b/98-kexec.rules.ppc64
index 85fe0b1..ac6d42a 100644
--- a/98-kexec.rules.ppc64
+++ b/98-kexec.rules.ppc64
@@ -17,7 +17,7 @@ LABEL="kdump_reload_mem"
# 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'"
+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 0 || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
GOTO="kdump_reload_end"
--
2.41.0