On 07/11, Valentin Schneider wrote: > > Later commits will need to issue a task_work_cancel() from within the > scheduler with the task's ->pi_lock held. > > Add a _locked variant that expects p->pi_lock to be held. Expose it in a > separate scheduler header file, as this really is a scheduler-only > interface. > > Signed-off-by: Valentin Schneider <vschneid@xxxxxxxxxx> > --- > kernel/sched/task_work_sched.h | 14 +++++++ > kernel/task_work.c | 67 ++++++++++++++++++++++++++-------- > 2 files changed, 66 insertions(+), 15 deletions(-) > create mode 100644 kernel/sched/task_work_sched.h I am not sure the new task_work_sched.h makes sense, but I won't argue. Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>