diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-03 00:56:22 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-03 00:56:22 +0300 |
commit | c93493b7cd40c20708e3373a7cc8e8049460d7ce (patch) | |
tree | 72e472420baacf2168d484bbeaf521423115c049 /include/linux/task_work.h | |
parent | cd77006e01b3198c75fb7819b3d0ff89709539bb (diff) | |
parent | ce593a6c480a22acba08795be313c0c6d49dd35d (diff) | |
download | linux-c93493b7cd40c20708e3373a7cc8e8049460d7ce.tar.xz |
Merge tag 'io_uring-5.8-2020-07-01' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe:
"One fix in here, for a regression in 5.7 where a task is waiting in
the kernel for a condition, but that condition won't become true until
task_work is run. And the task_work can't be run exactly because the
task is waiting in the kernel, so we'll never make any progress.
One example of that is registering an eventfd and queueing io_uring
work, and then the task goes and waits in eventfd read with the
expectation that it'll get woken (and read an event) when the io_uring
request completes. The io_uring request is finished through task_work,
which won't get run while the task is looping in eventfd read"
* tag 'io_uring-5.8-2020-07-01' of git://git.kernel.dk/linux-block:
io_uring: use signal based task_work running
task_work: teach task_work_add() to do signal_wake_up()
Diffstat (limited to 'include/linux/task_work.h')
-rw-r--r-- | include/linux/task_work.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/task_work.h b/include/linux/task_work.h index bd9a6a91c097..0fb93aafa478 100644 --- a/include/linux/task_work.h +++ b/include/linux/task_work.h @@ -13,7 +13,10 @@ init_task_work(struct callback_head *twork, task_work_func_t func) twork->func = func; } -int task_work_add(struct task_struct *task, struct callback_head *twork, bool); +#define TWA_RESUME 1 +#define TWA_SIGNAL 2 +int task_work_add(struct task_struct *task, struct callback_head *twork, int); + struct callback_head *task_work_cancel(struct task_struct *, task_work_func_t); void task_work_run(void); |