execve: Fix calling ptrace_report_signal after preemption is disabled

Change-Id: I451d28d985ab330d855501597713e982b8febf4e
Refs: 1194
This commit is contained in:
Tomoki Shirasawa
2018-09-13 20:41:14 +09:00
committed by Masamichi Takagi
parent 3df82d61ce
commit 2910818f06

View File

@@ -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;