Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'io_uring-6.0-2022-09-18' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:
"Nothing really major here, but figured it'd be nicer to just get these
flushed out for -rc6 so that the 6.1 branch will have them as well.
That'll make our lives easier going forward in terms of development,
and avoid trivial conflicts in this area.

- Simple trace rename so that the returned opcode name is consistent
with the enum definition (Stefan)

- Send zc rsrc request vs notification lifetime fix (Pavel)"

* tag 'io_uring-6.0-2022-09-18' of git://git.kernel.dk/linux:
io_uring/opdef: rename SENDZC_NOTIF to SEND_ZC
io_uring/net: fix zc fixed buf lifetime

+10 -10
+9 -9
io_uring/net.c
··· 905 905 if (zc->flags & ~(IORING_RECVSEND_POLL_FIRST | 906 906 IORING_RECVSEND_FIXED_BUF)) 907 907 return -EINVAL; 908 - if (zc->flags & IORING_RECVSEND_FIXED_BUF) { 909 - unsigned idx = READ_ONCE(sqe->buf_index); 910 - 911 - if (unlikely(idx >= ctx->nr_user_bufs)) 912 - return -EFAULT; 913 - idx = array_index_nospec(idx, ctx->nr_user_bufs); 914 - req->imu = READ_ONCE(ctx->user_bufs[idx]); 915 - io_req_set_rsrc_node(req, ctx, 0); 916 - } 917 908 notif = zc->notif = io_alloc_notif(ctx); 918 909 if (!notif) 919 910 return -ENOMEM; ··· 912 921 notif->cqe.res = 0; 913 922 notif->cqe.flags = IORING_CQE_F_NOTIF; 914 923 req->flags |= REQ_F_NEED_CLEANUP; 924 + if (zc->flags & IORING_RECVSEND_FIXED_BUF) { 925 + unsigned idx = READ_ONCE(sqe->buf_index); 926 + 927 + if (unlikely(idx >= ctx->nr_user_bufs)) 928 + return -EFAULT; 929 + idx = array_index_nospec(idx, ctx->nr_user_bufs); 930 + req->imu = READ_ONCE(ctx->user_bufs[idx]); 931 + io_req_set_rsrc_node(notif, ctx, 0); 932 + } 915 933 916 934 zc->buf = u64_to_user_ptr(READ_ONCE(sqe->addr)); 917 935 zc->len = READ_ONCE(sqe->len);
+1 -1
io_uring/opdef.c
··· 471 471 .prep_async = io_uring_cmd_prep_async, 472 472 }, 473 473 [IORING_OP_SEND_ZC] = { 474 - .name = "SENDZC_NOTIF", 474 + .name = "SEND_ZC", 475 475 .needs_file = 1, 476 476 .unbound_nonreg_file = 1, 477 477 .pollout = 1,