History

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

Linus Torvalds committed 1 year ago

Commit d28de4f2 parents edeee68 e4e6aae2 files · +4 −0Browse files

Unified · Split

2 files
  1. io_uring/futex.c +3 −0
  2. io_uring/io_uring.c +1 −0
io_uring/futex.c+3−0
@@ -288,6 +288,7 @@ int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags) · 287 unmodified lines
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 @@ done: · 15 unmodified lines
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+1−0
@@ -2119,6 +2119,7 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, · 2118 unmodified lines
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;