Skip to content

Commit d28de4f

Browse files
committed
Merge tag 'io_uring-6.17-20250822' of git://git.kernel.dk/linux
Pull io_uring fixes from Jens Axboe: "Just two small fixes - one that fixes inconsistent ->async_data vs REQ_F_ASYNC_DATA handling in futex, and a followup that just ensures that if other opcode handlers mess this up, it won't cause any issues" * tag 'io_uring-6.17-20250822' of git://git.kernel.dk/linux: io_uring: clear ->async_data as part of normal init io_uring/futex: ensure io_futex_wait() cleans up properly on failure
2 parents edeee68 + e4e6aae commit d28de4f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

io_uring/futex.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)
288288
goto done_unlock;
289289
}
290290

291+
req->flags |= REQ_F_ASYNC_DATA;
291292
req->async_data = ifd;
292293
ifd->q = futex_q_init;
293294
ifd->q.bitset = iof->futex_mask;
@@ -309,6 +310,8 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)
309310
if (ret < 0)
310311
req_set_fail(req);
311312
io_req_set_res(req, ret, 0);
313+
req->async_data = NULL;
314+
req->flags &= ~REQ_F_ASYNC_DATA;
312315
kfree(ifd);
313316
return IOU_COMPLETE;
314317
}

io_uring/io_uring.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req,
21192119
req->file = NULL;
21202120
req->tctx = current->io_uring;
21212121
req->cancel_seq_set = false;
2122+
req->async_data = NULL;
21222123

21232124
if (unlikely(opcode >= IORING_OP_LAST)) {
21242125
req->opcode = 0;

0 commit comments

Comments
 (0)