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.3-2023-03-16' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

- When PF_NO_SETAFFINITY was removed for io-wq threads, we kind of
forgot about the SQPOLL thread. Remove it there as well, there's even
less of a reason to set it there (Michal)

- Fixup a confusing 'ret' setting (Li)

- When MSG_RING is used to send a direct descriptor to another ring,
it's possible to have it allocate it on the target ring rather than
provide a specific index for it. If this is done, return the chosen
value in the CQE, like we would've done locally (Pavel)

- Fix a regression in this series on huge page bvec collapsing (Pavel)

* tag 'io_uring-6.3-2023-03-16' of git://git.kernel.dk/linux:
io_uring/rsrc: fix folio accounting
io_uring/msg_ring: let target know allocated index
io_uring: rsrc: Optimize return value variable 'ret'
io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads

+11 -4
+3 -1
io_uring/msg_ring.c
··· 202 202 * completes with -EOVERFLOW, then the sender must ensure that a 203 203 * later IORING_OP_MSG_RING delivers the message. 204 204 */ 205 - if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, 0)) 205 + if (!io_post_aux_cqe(target_ctx, msg->user_data, ret, 0)) 206 206 ret = -EOVERFLOW; 207 207 out_unlock: 208 208 io_double_unlock_ctx(target_ctx); ··· 229 229 struct io_ring_ctx *ctx = req->ctx; 230 230 struct file *src_file = msg->src_file; 231 231 232 + if (msg->len) 233 + return -EINVAL; 232 234 if (target_ctx == ctx) 233 235 return -EINVAL; 234 236 if (target_ctx->flags & IORING_SETUP_R_DISABLED)
+8 -2
io_uring/rsrc.c
··· 410 410 unsigned nr, struct io_rsrc_data **pdata) 411 411 { 412 412 struct io_rsrc_data *data; 413 - int ret = -ENOMEM; 413 + int ret = 0; 414 414 unsigned i; 415 415 416 416 data = kzalloc(sizeof(*data), GFP_KERNEL); ··· 1235 1235 } 1236 1236 } 1237 1237 if (folio) { 1238 - folio_put_refs(folio, nr_pages - 1); 1238 + /* 1239 + * The pages are bound to the folio, it doesn't 1240 + * actually unpin them but drops all but one reference, 1241 + * which is usually put down by io_buffer_unmap(). 1242 + * Note, needs a better helper. 1243 + */ 1244 + unpin_user_pages(&pages[1], nr_pages - 1); 1239 1245 nr_pages = 1; 1240 1246 } 1241 1247 }
-1
io_uring/sqpoll.c
··· 233 233 set_cpus_allowed_ptr(current, cpumask_of(sqd->sq_cpu)); 234 234 else 235 235 set_cpus_allowed_ptr(current, cpu_online_mask); 236 - current->flags |= PF_NO_SETAFFINITY; 237 236 238 237 mutex_lock(&sqd->lock); 239 238 while (1) {