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
288 goto done_unlock;288 goto done_unlock;
289 }289 }
290 290
291 req->flags |= REQ_F_ASYNC_DATA;
291 req->async_data = ifd;292 req->async_data = ifd;
292 ifd->q = futex_q_init;293 ifd->q = futex_q_init;
293 ifd->q.bitset = iof->futex_mask;294 ifd->q.bitset = iof->futex_mask;
@@ -309,6 +310,8 @@ done: · 15 unmodified lines
309 if (ret < 0)310 if (ret < 0)
310 req_set_fail(req);311 req_set_fail(req);
311 io_req_set_res(req, ret, 0);312 io_req_set_res(req, ret, 0);
313 req->async_data = NULL;
314 req->flags &= ~REQ_F_ASYNC_DATA;
312 kfree(ifd);315 kfree(ifd);
313 return IOU_COMPLETE;316 return IOU_COMPLETE;
314}317}
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
2119 req->file = NULL;2119 req->file = NULL;
2120 req->tctx = current->io_uring;2120 req->tctx = current->io_uring;
2121 req->cancel_seq_set = false;2121 req->cancel_seq_set = false;
2122 req->async_data = NULL;
2122 2123
2123 if (unlikely(opcode >= IORING_OP_LAST)) {2124 if (unlikely(opcode >= IORING_OP_LAST)) {
2124 req->opcode = 0;2125 req->opcode = 0;