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-08-19' of git://git.kernel.dk/linux-block

Pull io_uring fixes from Jens Axboe:
"A few fixes for regressions in this cycle:

- Two instances of using the wrong "has async data" helper (Pavel)

- Fixup zero-copy address import (Pavel)

- Bump zero-copy notification slot limit (Pavel)"

* tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block:
io_uring/net: use right helpers for async_data
io_uring/notif: raise limit on notification slots
io_uring/net: improve zc addr import error handling
io_uring/net: use right helpers for async recycle

+12 -12
+11 -11
io_uring/net.c
··· 116 116 { 117 117 struct io_async_msghdr *hdr = req->async_data; 118 118 119 - if (!hdr || issue_flags & IO_URING_F_UNLOCKED) 119 + if (!req_has_async_data(req) || issue_flags & IO_URING_F_UNLOCKED) 120 120 return; 121 121 122 122 /* Let normal cleanup path reap it if we fail adding to the cache */ ··· 152 152 struct io_async_msghdr *kmsg, 153 153 unsigned int issue_flags) 154 154 { 155 - struct io_async_msghdr *async_msg = req->async_data; 155 + struct io_async_msghdr *async_msg; 156 156 157 - if (async_msg) 157 + if (req_has_async_data(req)) 158 158 return -EAGAIN; 159 159 async_msg = io_recvmsg_alloc_async(req, issue_flags); 160 160 if (!async_msg) { ··· 977 977 msg.msg_controllen = 0; 978 978 msg.msg_namelen = 0; 979 979 980 + if (zc->addr) { 981 + ret = move_addr_to_kernel(zc->addr, zc->addr_len, &address); 982 + if (unlikely(ret < 0)) 983 + return ret; 984 + msg.msg_name = (struct sockaddr *)&address; 985 + msg.msg_namelen = zc->addr_len; 986 + } 987 + 980 988 if (zc->flags & IORING_RECVSEND_FIXED_BUF) { 981 989 ret = io_import_fixed(WRITE, &msg.msg_iter, req->imu, 982 990 (u64)(uintptr_t)zc->buf, zc->len); ··· 998 990 ret = io_notif_account_mem(notif, zc->len); 999 991 if (unlikely(ret)) 1000 992 return ret; 1001 - } 1002 - 1003 - if (zc->addr) { 1004 - ret = move_addr_to_kernel(zc->addr, zc->addr_len, &address); 1005 - if (unlikely(ret < 0)) 1006 - return ret; 1007 - msg.msg_name = (struct sockaddr *)&address; 1008 - msg.msg_namelen = zc->addr_len; 1009 993 } 1010 994 1011 995 msg_flags = zc->msg_flags | MSG_ZEROCOPY;
+1 -1
io_uring/notif.h
··· 8 8 #include "rsrc.h" 9 9 10 10 #define IO_NOTIF_SPLICE_BATCH 32 11 - #define IORING_MAX_NOTIF_SLOTS (1U << 10) 11 + #define IORING_MAX_NOTIF_SLOTS (1U << 15) 12 12 13 13 struct io_notif_data { 14 14 struct file *file;