From: Jeff Dike Date: Thu, 18 Aug 2005 18:24:25 +0000 (-0700) Subject: [PATCH] uml: fix a crash under screen X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2eaa297ca234eb518673b28dd6f3715d4b292e09;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] uml: fix a crash under screen Running UML inside a detached screen delivers SIGWINCH when UML is not expecting it. This patch ignores them. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index 6dd9e5bf18ed..f228f8b54194 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c @@ -61,7 +61,11 @@ void wait_stub_done(int pid, int sig, char * fname) CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); } while((n >= 0) && WIFSTOPPED(status) && - (WSTOPSIG(status) == SIGVTALRM)); + ((WSTOPSIG(status) == SIGVTALRM) || + /* running UML inside a detached screen can cause + * SIGWINCHes + */ + (WSTOPSIG(status) == SIGWINCH))); if((n < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGUSR1 && WSTOPSIG(status) != SIGTRAP)){