History

Merge tag 'io_uring-6.18-20251009' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux

Pull io_uring fixes from Jens Axboe: - Fixup indentation in the UAPI header - Two fixes for zcrx. One fixes receiving too much in some cases, and the other deals with not correctly incrementing the source in the fallback copy loop - Fix for a race in the IORING_OP_WAITID command, where there was a small window where the request would be left on the wait_queue_head list even though it was being canceled/completed - Update liburing git URL in the kernel tree * tag 'io_uring-6.18-20251009' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring/zcrx: increment fallback loop src offset io_uring/zcrx: fix overshooting recv limit io_uring: use tab indentation for IORING_SEND_VECTORIZED comment io_uring/waitid: always prune wait queue entry in io_waitid_wait() io_uring: update liburing git URL

Linus Torvalds committed 1 year ago

Commit eba41c02 parents 8cc8ea2 e9a9dcb4 files · +9 −3Browse files

Unified · Split

4 files
  1. include/uapi/linux/io_uring.h +1 −1
  2. io_uring/io_uring.c +1 −1
  3. io_uring/waitid.c +2 −1
  4. io_uring/zcrx.c +5 −0
include/uapi/linux/io_uring.h+1−1
@@ -404,7 +404,7 @@ enum io_uring_op { · 403 unmodified lines
404 * will be contiguous from the starting buffer ID.404 * will be contiguous from the starting buffer ID.
405 *405 *
406 * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec406 * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec
407 * to allow vectorized send operations.407 * to allow vectorized send operations.
408 */408 */
409#define IORING_RECVSEND_POLL_FIRST (1U << 0)409#define IORING_RECVSEND_POLL_FIRST (1U << 0)
410#define IORING_RECV_MULTISHOT (1U << 1)410#define IORING_RECV_MULTISHOT (1U << 1)
io_uring/io_uring.c+1−1
@@ -29,7 +29,7 @@ · 28 unmodified lines
29 *29 *
30 * Also see the examples in the liburing library:30 * Also see the examples in the liburing library:
31 *31 *
32 * git://git.kernel.dk/liburing32 * git://git.kernel.org/pub/scm/linux/kernel/git/axboe/liburing.git
33 *33 *
34 * io_uring also uses READ/WRITE_ONCE() for _any_ store or load that happens34 * io_uring also uses READ/WRITE_ONCE() for _any_ store or load that happens
35 * from data shared between the kernel and application. This is done both35 * from data shared between the kernel and application. This is done both
io_uring/waitid.c+2−1
@@ -230,13 +230,14 @@ static int io_waitid_wait(struct wait_queue_entry *wait, unsigned mode, · 229 unmodified lines
230 if (!pid_child_should_wake(wo, p))230 if (!pid_child_should_wake(wo, p))
231 return 0;231 return 0;
232 232
233 list_del_init(&wait->entry);
234
233 /* cancel is in progress */235 /* cancel is in progress */
234 if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK)236 if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK)
235 return 1;237 return 1;
236 238
237 req->io_task_work.func = io_waitid_cb;239 req->io_task_work.func = io_waitid_cb;
238 io_req_task_work_add(req);240 io_req_task_work_add(req);
239 list_del_init(&wait->entry);
240 return 1;241 return 1;
241}242}
242 243
io_uring/zcrx.c+5−0
@@ -1079,6 +1079,7 @@ static ssize_t io_copy_page(struct io_copy_cache *cc, struct page *src_page, · 1078 unmodified lines
1079 1079
1080 cc->size -= n;1080 cc->size -= n;
1081 cc->offset += n;1081 cc->offset += n;
1082 src_offset += n;
1082 len -= n;1083 len -= n;
1083 copied += n;1084 copied += n;
1084 }1085 }
@@ -1236,12 +1237,16 @@ io_zcrx_recv_skb(read_descriptor_t *desc, struct sk_buff *skb, · 151 unmodified lines
1236 1237
1237 end = start + frag_iter->len;1238 end = start + frag_iter->len;
1238 if (offset < end) {1239 if (offset < end) {
1240 size_t count;
1241
1239 copy = end - offset;1242 copy = end - offset;
1240 if (copy > len)1243 if (copy > len)
1241 copy = len;1244 copy = len;
1242 1245
1243 off = offset - start;1246 off = offset - start;
1247 count = desc->count;
1244 ret = io_zcrx_recv_skb(desc, frag_iter, off, copy);1248 ret = io_zcrx_recv_skb(desc, frag_iter, off, copy);
1249 desc->count = count;
1245 if (ret < 0)1250 if (ret < 0)
1246 goto out;1251 goto out;
1247 1252