backport the JOBCTL_TRACED changes to reconcile CONFIG_PREEMPT_RT with ptrace
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2174325
In short, ptrace is absolutely broken on RT 9.3 because it shares the same tree with the stock kernel. We can't even trust task_is_traced(), a TASK_TRACED task can sleep on non-raw spin-lock and move TASK_TRACED into ->saved_state.
RT needs something like https://bugzilla.redhat.com/attachment.cgi?id=1970209 but this series tries to fix the problem without rt-specific changes.
Signed-off-by: Oleg Nesterov oleg@redhat.com