On 04/30, Peter Zijlstra wrote: > > --- a/kernel/signal.c > +++ b/kernel/signal.c > @@ -1968,7 +1968,7 @@ static void ptrace_stop(int exit_code, i > * atomic with respect to siglock and should be done after the arch > * hook as siglock is released and regrabbed across it. > */ > - set_current_state(TASK_TRACED); > + set_special_state(TASK_TRACED);
Yes, but please note the comment above, we need a barrier after state = TASK_TRACED, that is why ptrace_stop() does set_current_state(), not __set_current_state(). Otherwise both patches look good to me, feel free to add Reviewed-by: Oleg Nesterov <[email protected]>

