All consoles found on for_each_console are registered, meaning that all of them are CON_ENABLED. The code tries to find an active console, so check if the console is not suspended instead.
Signed-off-by: Marcos Paulo de Souza <mpdeso...@suse.com> --- arch/um/kernel/kmsg_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 4190211752726593dd2847f66efd9d3a61cea982..f3025b2a813453f479d720618c630bee135d4e08 100644 --- a/arch/um/kernel/kmsg_dump.c +++ b/arch/um/kernel/kmsg_dump.c @@ -31,7 +31,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper, * expected to output the crash information. */ if (strcmp(con->name, "ttynull") != 0 && - (console_srcu_read_flags(con) & CON_ENABLED)) { + (console_srcu_read_flags(con) & CON_SUSPENDED) == 0) { break; } } -- 2.49.0