From 2910818f06d2b25eb24a60f1d874d2a93ed281af Mon Sep 17 00:00:00 2001 From: Tomoki Shirasawa Date: Thu, 13 Sep 2018 20:41:14 +0900 Subject: [PATCH] execve: Fix calling ptrace_report_signal after preemption is disabled Change-Id: I451d28d985ab330d855501597713e982b8febf4e Refs: 1194 --- kernel/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/syscall.c b/kernel/syscall.c index e2190cf5..466ca890 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -1980,7 +1980,9 @@ static int ptrace_report_exec(struct thread *thread) int sig = (SIGTRAP | (PTRACE_EVENT_EXEC << 8)); memcpy(&ctx, &thread->ctx, sizeof ctx); + preempt_enable(); ptrace_report_signal(thread, sig); + preempt_disable(); memcpy(&thread->ctx, &ctx, sizeof ctx); } return 0;