s390/sclp: Deactivate sclp after all its users
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 14 Oct 2024 05:50:06 +0000 (07:50 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 16 Oct 2024 09:32:32 +0000 (11:32 +0200)
commit0d9dc27df22d9b5c8dc7185c8dddbc14f5468518
tree85b196a3c914f63cdc8385f20557ba2ad64a42a5
parent9b52ddeb468c74db7f652f7ac5a390591bb47dc7
s390/sclp: Deactivate sclp after all its users

On reboot the SCLP interface is deactivated through a reboot notifier.
This happens before other components using SCLP have the chance to run
their own reboot notifiers.
Two of those components are the SCLP console and tty drivers which try
to flush the last outstanding messages.
At that point the SCLP interface is already unusable and the messages
are discarded.

Execute sclp_deactivate() as late as possible to avoid this issue.

Fixes: 4ae46db99cd8 ("s390/consoles: improve panic notifiers reliability")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Link: https://lore.kernel.org/r/20241014-s390-kunit-v1-1-941defa765a6@linutronix.de
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/sclp.c