Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db271cf0 authored by Richard Weinberger's avatar Richard Weinberger Committed by Linus Torvalds
Browse files

um: fix crash while os_dump_core()



os_dump_core() emits SIGTERM to terminate all UML processes.  Kernel
threads have to exit on SIGTERM instead of calling last_ditch_exit().
Multiple calls to last_ditch_exit() can cause a crash.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 607647ab
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -253,6 +253,7 @@ void init_new_thread_signals(void)
		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM,
		    SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, SIGALRM,
		    SIGVTALRM, -1);
		    SIGVTALRM, -1);
	signal(SIGWINCH, SIG_IGN);
	signal(SIGWINCH, SIG_IGN);
	signal(SIGTERM, SIG_DFL);
}
}


int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr)
int run_kernel_thread(int (*fn)(void *), void *arg, jmp_buf **jmp_ptr)