From 2d77f6fcf841261796f01cba19b4ea1ad8713936 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 10 Jul 2006 04:45:16 -0700 Subject: [PATCH] [PATCH] uml: make mconsole version requests happen in a process Handling a host mconsole version request must be done in a process context rather than interrupt context now that utsname information can be process-specific rather than global. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/drivers/mconsole_user.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c index 4b109fe7fff8..9bfd405c3bd8 100644 --- a/arch/um/drivers/mconsole_user.c +++ b/arch/um/drivers/mconsole_user.c @@ -18,7 +18,12 @@ #include "umid.h" static struct mconsole_command commands[] = { - { "version", mconsole_version, MCONSOLE_INTR }, + /* With uts namespaces, uts information becomes process-specific, so + * we need a process context. If we try handling this in interrupt + * context, we may hit an exiting process without a valid uts + * namespace. + */ + { "version", mconsole_version, MCONSOLE_PROC }, { "halt", mconsole_halt, MCONSOLE_PROC }, { "reboot", mconsole_reboot, MCONSOLE_PROC }, { "config", mconsole_config, MCONSOLE_PROC }, -- 2.20.1