mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-22 08:44:09 +07:00
deal with task_work callbacks adding more work
It doesn't matter on normal return to userland path (we'll recheck the NOTIFY_RESUME flag anyway), but in case of exit_task_work() we'll need that as soon as we get callbacks capable of triggering more task_work_add(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
ed3e694d78
commit
a2d4c71d15
@ -60,6 +60,7 @@ void task_work_run(void)
|
||||
struct task_struct *task = current;
|
||||
struct callback_head *p, *q;
|
||||
|
||||
while (1) {
|
||||
raw_spin_lock_irq(&task->pi_lock);
|
||||
p = task->task_works;
|
||||
task->task_works = NULL;
|
||||
@ -75,4 +76,5 @@ void task_work_run(void)
|
||||
q->func(q);
|
||||
q = p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user