kernel: update callers of task_work_add() to use TWA_RESUME
Subsystems (13)
PATCH 1/1 kernel: update callers of task_work_add() to use TWA_RESUME
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated TWA_RESUME instead.
This was noted in the original commit as well:
e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()")
---
arch/x86/kernel/cpu/mce/core.c +1 -1
@@ -1345,7 +1345,7 @@ void noinstr do_machine_check(struct pt_regs *regs) current->mce_kill_me.func = kill_me_maybe;if (kill_it) current->mce_kill_me.func = kill_me_now; -task_work_add (current, ¤t->mce_kill_me, true); +task_work_add (current, ¤t->mce_kill_me,TWA_RESUME ); }else {/* * Handle an MCE which has happened in kernel space but from
arch/x86/kernel/cpu/resctrl/rdtgroup.c +1 -1
@@ -561,7 +561,7 @@ static int __rdtgroup_move_task(struct task_struct *tsk,* callback has been invoked. */ atomic_inc (&rdtgrp->waitcount); - ret =task_work_add (tsk, &callback->work, true); + ret =task_work_add (tsk, &callback->work,TWA_RESUME );if (ret) {/* * Task is exiting. Drop the refcount and free the callback.
drivers/acpi/apei/ghes.c +1 -1
@@ -879,7 +879,7 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) estatus_node->task_work.func = ghes_kick_task_work; estatus_node->task_work_cpu =smp_processor_id (); ret =task_work_add (current, &estatus_node->task_work, - true); +TWA_RESUME );if (ret) estatus_node->task_work.func =NULL ; }
drivers/android/binder.c +1 -1
@@ -2251,7 +2251,7 @@ static void binder_deferred_fd_close(int fd)__close_fd_get_file (fd, &twcb->file);if (twcb->file) {filp_close (twcb->file, current->files); -task_work_add (current, &twcb->twork, true); +task_work_add (current, &twcb->twork,TWA_RESUME ); }else {kfree (twcb); }
fs/file_table.c +1 -1
@@ -339,7 +339,7 @@ void fput_many(struct file *file, unsigned int refs)if (likely (!in_interrupt () && !(task->flags &PF_KTHREAD ))) {init_task_work (&file->f_u.fu_rcuhead, ____fput); -if (!task_work_add (task, &file->f_u.fu_rcuhead, true)) +if (!task_work_add (task, &file->f_u.fu_rcuhead,TWA_RESUME ))return ;/* * After this task has run exit_task_work(),
fs/namespace.c +1 -1
@@ -1191,7 +1191,7 @@ static void mntput_no_expire(struct mount *mnt)struct task_struct *task = current;if (likely (!(task->flags &PF_KTHREAD ))) {init_task_work (&mnt->mnt_rcu, __cleanup_mnt); -if (!task_work_add (task, &mnt->mnt_rcu, true)) +if (!task_work_add (task, &mnt->mnt_rcu,TWA_RESUME ))return ; }if (llist_add (&mnt->mnt_llist, &delayed_mntput_list))
kernel/events/uprobes.c +1 -1
@@ -1823,7 +1823,7 @@ void uprobe_copy_process(struct task_struct *t, unsigned long flags) t->utask->dup_xol_addr = area->vaddr;init_task_work (&t->utask->dup_xol_work, dup_xol_work); -task_work_add (t, &t->utask->dup_xol_work, true); +task_work_add (t, &t->utask->dup_xol_work,TWA_RESUME ); }/*
kernel/sched/fair.c +1 -1
@@ -2923,7 +2923,7 @@ static void task_tick_numa(struct rq *rq, struct task_struct *curr) curr->node_stamp += period;if (!time_before (jiffies, curr->mm->numa_next_scan)) -task_work_add (curr, work, true); +task_work_add (curr, work,TWA_RESUME ); } }
security/keys/keyctl.c +1 -1
@@ -1693,7 +1693,7 @@ long keyctl_session_to_parent(void)/* the replacement session keyring is applied just prior to userspace * restarting */ - ret =task_work_add (parent, newwork, true); + ret =task_work_add (parent, newwork,TWA_RESUME );if (!ret) newwork =NULL ; unlock:
security/yama/yama_lsm.c +1 -1
@@ -99,7 +99,7 @@ static void report_access(const char *access, struct task_struct *target, info->access = access; info->target = target; info->agent = agent; -if (task_work_add (current, &info->work, true) ==0 ) +if (task_work_add (current, &info->work,TWA_RESUME ) ==0 )return ;/* success */ WARN (1 ,"report_access called from exiting task" );
Signature · 1 line
Jens Axboe
Quoted 5 lines · Jens Axboe
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated
TWA_RESUMEinstead.
Thanks,
Quoted 5 lines · Jens Axboe
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated
TWA_RESUMEinstead.
Quoted 8 lines
This was noted in the original commit as well:
e91b48162332("task_work: teachtask_work_add()to dosignal_wake_up()")Cc Oleg Nesterov <[email protected]>Cc Peter Zijlstra <[email protected]>Signed-off-by Jens Axboe <[email protected]>
How do you want to route this?
Quoted 10 lines · On 8/10/20 5:44 AM, [email protected] wrote:
Quoted 9 lines · Jens Axboe
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated
TWA_RESUMEinstead.This was noted in the original commit as well:
e91b48162332("task_work: teachtask_work_add()to dosignal_wake_up()")
Quoted 8 lines
Quoted 4 lines
Cc Oleg Nesterov <[email protected]>Cc Peter Zijlstra <[email protected]>Signed-off-by Jens Axboe <[email protected]>How do you want to route this?
I don't really care, as I have no dependencies on it. Feel free to queue it up! It's just sitting at the top of my io_uring branch right now, but that's because I had to stuff it somewhere. Easy to pop off the top.
Signature · 1 line
Jens Axboe
Quoted 16 lines · Jens Axboe
Quoted 15 lines · On 8/10/20 5:44 AM, [email protected] wrote:
Quoted 13 lines · Jens Axboe
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated
TWA_RESUMEinstead.This was noted in the original commit as well:
e91b48162332("task_work: teachtask_work_add()to dosignal_wake_up()")Cc Oleg Nesterov <[email protected]>Cc Peter Zijlstra <[email protected]>Signed-off-by Jens Axboe <[email protected]>
Quoted 7 lines
Quoted 3 lines
How do you want to route this?
I don't really care, as I have no dependencies on it. Feel free to queue it up! It's just sitting at the top of my
io_uringbranch right now, but that's because I had to stuff it somewhere. Easy to pop off the top.
FWIW, I dropped this from my branch, so would be great if you or Oleg could push this one upstream.
Signature · 1 line
Jens Axboe
Peter Zijlstra
maintainerQuoted 19 lines · Jens Axboe
Quoted 18 lines · Jens Axboe
Quoted 17 lines · On 8/10/20 5:44 AM, [email protected] wrote:
Quoted 5 lines · Jens Axboe
Any pre-existing caller of this function uses 'true' to signal to use notifications or not, but we now also have signaled notifications. Update existing callers that specify 'true' for notify to use the updated
TWA_RESUMEinstead.Quoted 8 lines
This was noted in the original commit as well:
e91b48162332("task_work: teachtask_work_add()to dosignal_wake_up()")Cc Oleg Nesterov <[email protected]>Cc Peter Zijlstra <[email protected]>Signed-off-by Jens Axboe <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
How do you want to route this?
I don't really care, as I have no dependencies on it. Feel free to queue it up! It's just sitting at the top of my
io_uringbranch right now, but that's because I had to stuff it somewhere. Easy to pop off the top.FWIW, I dropped this from my branch, so would be great if you or Oleg could push this one upstream.
Will do, thanks!