This is a note to let you know that I've just added the patch titled ktest.pl: Fix missing "end_monitor" when machine check fails to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ktest.pl-fix-missing-end_monitor-when-machine-check-fails.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7 Mon Sep 17 00:00:00 2001 From: Steven Rostedt <rostedt@xxxxxxxxxxx> Date: Wed, 18 Jan 2023 11:31:25 -0500 Subject: ktest.pl: Fix missing "end_monitor" when machine check fails From: Steven Rostedt <rostedt@xxxxxxxxxxx> commit e8bf9b98d40dbdf4e39362e3b85a70c61da68cb7 upstream. In the "reboot" command, it does a check of the machine to see if it is still alive with a simple "ssh echo" command. If it fails, it will assume that a normal "ssh reboot" is not possible and force a power cycle. In this case, the "start_monitor" is executed, but the "end_monitor" is not, and this causes the screen will not be given back to the console. That is, after the test, a "reset" command needs to be performed, as "echo" is turned off. Cc: stable@xxxxxxxxxxxxxxx Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made") Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/ktest/ktest.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1488,7 +1488,8 @@ sub reboot { # Still need to wait for the reboot to finish wait_for_monitor($time, $reboot_success_line); - + } + if ($powercycle || $time) { end_monitor; } } Patches currently in stable-queue which might be from rostedt@xxxxxxxxxxx are queue-5.15/sched-rt-pick_next_rt_entity-check-list_entry.patch queue-5.15/rcu-make-rcu_lockdep_warn-avoid-early-lockdep-checks.patch queue-5.15/trace-blktrace-fix-memory-leak-with-using-debugfs_lo.patch queue-5.15/acpi-don-t-build-acpica-with-os.patch queue-5.15/selftests-ftrace-fix-bash-specific-operator.patch queue-5.15/ktest.pl-fix-missing-end_monitor-when-machine-check-fails.patch queue-5.15/ktest.pl-add-run_timeout-option-with-default-unlimited.patch queue-5.15/ktest.pl-give-back-console-on-ctrt-c-on-monitor.patch queue-5.15/ring-buffer-handle-race-between-rb_move_tail-and-rb_check_pages.patch