Oleg Nesterov e91b481623 task_work: teach task_work_add() to do signal_wake_up()
So that the target task will exit the wait_event_interruptible-like
loop and call task_work_run() asap.

The patch turns "bool notify" into 0,TWA_RESUME,TWA_SIGNAL enum, the
new TWA_SIGNAL flag implies signal_wake_up().  However, it needs to
avoid the race with recalc_sigpending(), so the patch also adds the
new JOBCTL_TASK_WORK bit included in JOBCTL_PENDING_MASK.

TODO: once this patch is merged we need to change all current users
of task_work_add(notify = true) to use TWA_RESUME.

Cc: stable@vger.kernel.org # v5.7
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-06-30 12:18:08 -06:00
..
2020-06-12 12:13:36 -07:00
2020-06-07 09:52:36 -07:00
\n
2020-04-06 08:58:42 -07:00
2020-06-02 17:13:37 -07:00
2020-06-03 13:06:42 -07:00
2020-01-08 16:32:55 +00:00
2019-05-24 20:16:01 +02:00
2020-06-03 13:06:42 -07:00
2020-06-14 11:39:31 -07:00
2019-12-04 15:18:39 +01:00
2020-03-30 18:06:39 -07:00
2019-12-18 18:07:31 +01:00
2020-05-09 13:57:12 +02:00
2020-06-04 19:06:24 -07:00
2020-05-09 13:57:12 +02:00