Hi Hillf,

On 07/19, Hillf Danton wrote:
>
> Dunno if the wheel prior to JOBCTL_TASK_WORK helps debug the warnings.
>
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -2541,7 +2541,7 @@ bool get_signal(struct ksignal *ksig)
>
>  relock:
>       spin_lock_irq(&sighand->siglock);
> -     current->jobctl &= ~JOBCTL_TASK_WORK;
> +     task_clear_jobctl_pending(current, JOBCTL_TASK_WORK);
>       if (unlikely(current->task_works)) {
>               spin_unlock_irq(&sighand->siglock);
>               task_work_run();
> --- a/kernel/task_work.c
> +++ b/kernel/task_work.c
> @@ -43,8 +43,8 @@ task_work_add(struct task_struct *task,
>               break;
>       case TWA_SIGNAL:
>               if (lock_task_sighand(task, &flags)) {
> -                     task->jobctl |= JOBCTL_TASK_WORK;
> -                     signal_wake_up(task, 0);
> +                     if (task_set_jobctl_pending(task, JOBCTL_TASK_WORK))
> +                             recalc_sigpending_and_wake(task);
>                       unlock_task_sighand(task, &flags);

To be be honest I don't understand why do you think this makes any sense...

But this doesn't matter, please note that the Jiri tested the kernel with
e91b48162332480f5 (which added JOBCTL_TASK_WORK) reverted.

Oleg.

Reply via email to