@@ -38,6 +38,9 @@ enum io_uring_cmd_flags {
IO_URING_F_CANCEL = (1 << 11),
IO_URING_F_COMPAT = (1 << 12),
IO_URING_F_TASK_DEAD = (1 << 13),
+
+ /* Set when issuing from spawn thread */
+ IO_URING_F_SPAWN = (1 << 14),
};
struct io_wq_work_node {
@@ -52,7 +52,7 @@ static int io_uring_spawn_task(void *data)
req->flags &= ~(REQ_F_HARDLINK | REQ_F_LINK);
if (!(req->flags & REQ_F_FAIL)) {
- err = io_issue_sqe(req, IO_URING_F_COMPLETE_DEFER);
+ err = io_issue_sqe(req, IO_URING_F_COMPLETE_DEFER|IO_URING_F_SPAWN);
/*
* We can't requeue a request from the spawn
* context. Fail the whole chain.
IORING_OP_EXEC can only be called from the spawn task context. Pass that information via the issue_flags to let it be verified by the IORING_OP_EXEC handler. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> --- include/linux/io_uring_types.h | 3 +++ io_uring/spawn.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)