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.4-2023-06-15' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:
"A fix for sendmsg with CMSG, and the followup fix discussed for
avoiding touching task->worker_private after the worker has started
exiting"

* tag 'io_uring-6.4-2023-06-15' of git://git.kernel.dk/linux:
io_uring/io-wq: clear current->worker_private on exit
io_uring/net: save msghdr->msg_control for retries

+13 -2
+6 -1
io_uring/io-wq.c
··· 220 220 list_del_rcu(&worker->all_list); 221 221 raw_spin_unlock(&wq->lock); 222 222 io_wq_dec_running(worker); 223 - worker->flags = 0; 223 + /* 224 + * this worker is a goner, clear ->worker_private to avoid any 225 + * inc/dec running calls that could happen as part of exit from 226 + * touching 'worker'. 227 + */ 228 + current->worker_private = NULL; 224 229 225 230 kfree_rcu(worker, rcu); 226 231 io_worker_ref_put(wq);
+7 -1
io_uring/net.c
··· 65 65 u16 addr_len; 66 66 u16 buf_group; 67 67 void __user *addr; 68 + void __user *msg_control; 68 69 /* used only for send zerocopy */ 69 70 struct io_kiocb *notif; 70 71 }; ··· 196 195 struct io_async_msghdr *iomsg) 197 196 { 198 197 struct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg); 198 + int ret; 199 199 200 200 iomsg->msg.msg_name = &iomsg->addr; 201 201 iomsg->free_iov = iomsg->fast_iov; 202 - return sendmsg_copy_msghdr(&iomsg->msg, sr->umsg, sr->msg_flags, 202 + ret = sendmsg_copy_msghdr(&iomsg->msg, sr->umsg, sr->msg_flags, 203 203 &iomsg->free_iov); 204 + /* save msg_control as sys_sendmsg() overwrites it */ 205 + sr->msg_control = iomsg->msg.msg_control; 206 + return ret; 204 207 } 205 208 206 209 int io_send_prep_async(struct io_kiocb *req) ··· 302 297 303 298 if (req_has_async_data(req)) { 304 299 kmsg = req->async_data; 300 + kmsg->msg.msg_control = sr->msg_control; 305 301 } else { 306 302 ret = io_sendmsg_copy_hdr(req, &iomsg); 307 303 if (ret)