From d301d5e54266bc30af9ee4f6f1efa7b331c5de67 Mon Sep 17 00:00:00 2001 From: Vivek Goyal Date: Mon, 8 Sep 2014 11:35:21 -0400 Subject: [PATCH] kdumpctl: Use kexec file based mode to unload kdump kernel Currently old kexec syscall denies unloading a kernel if secureboot is enabled. I think this is not right behavior and should be changed. But for now, use new syscall if secureboot is enabled and that allows unloading kernel. Signed-off-by: Vivek Goyal --- kdumpctl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kdumpctl b/kdumpctl index bb98225..9403d61 100755 --- a/kdumpctl +++ b/kdumpctl @@ -826,7 +826,12 @@ stop_fadump() stop_kdump() { - $KEXEC -p -u + if is_secure_boot_enforced; then + $KEXEC -s -p -u + else + $KEXEC -p -u + fi + if [ $? != 0 ]; then echo "kexec: failed to unload kdump kernel" return 1