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

Merge tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

- Fix for sigmask restoring while waiting for events (Alexey)

- Typo fix in comment (Haiyue)

- Fix for a msg_control retstore on SEND_ZC retries (Pavel)

* tag 'io_uring-6.9-20240412' of git://git.kernel.dk/linux:
io-uring: correct typo in comment for IOU_F_TWQ_LAZY_WAKE
io_uring/net: restore msg_control on sendzc retry
io_uring: Fix io_cqring_wait() not restoring sigmask on get_timespec64() failure

+15 -14
+1 -1
include/linux/io_uring_types.h
··· 13 13 * A hint to not wake right away but delay until there are enough of 14 14 * tw's queued to match the number of CQEs the task is waiting for. 15 15 * 16 - * Must not be used wirh requests generating more than one CQE. 16 + * Must not be used with requests generating more than one CQE. 17 17 * It's also ignored unless IORING_SETUP_DEFER_TASKRUN is set. 18 18 */ 19 19 IOU_F_TWQ_LAZY_WAKE = 1,
+13 -13
io_uring/io_uring.c
··· 2602 2602 if (__io_cqring_events_user(ctx) >= min_events) 2603 2603 return 0; 2604 2604 2605 - if (sig) { 2606 - #ifdef CONFIG_COMPAT 2607 - if (in_compat_syscall()) 2608 - ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig, 2609 - sigsz); 2610 - else 2611 - #endif 2612 - ret = set_user_sigmask(sig, sigsz); 2613 - 2614 - if (ret) 2615 - return ret; 2616 - } 2617 - 2618 2605 init_waitqueue_func_entry(&iowq.wq, io_wake_function); 2619 2606 iowq.wq.private = current; 2620 2607 INIT_LIST_HEAD(&iowq.wq.entry); ··· 2618 2631 2619 2632 iowq.timeout = ktime_add_ns(timespec64_to_ktime(ts), ktime_get_ns()); 2620 2633 io_napi_adjust_timeout(ctx, &iowq, &ts); 2634 + } 2635 + 2636 + if (sig) { 2637 + #ifdef CONFIG_COMPAT 2638 + if (in_compat_syscall()) 2639 + ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig, 2640 + sigsz); 2641 + else 2642 + #endif 2643 + ret = set_user_sigmask(sig, sigsz); 2644 + 2645 + if (ret) 2646 + return ret; 2621 2647 } 2622 2648 2623 2649 io_napi_busy_loop(ctx, &iowq);
+1
io_uring/net.c
··· 1276 1276 1277 1277 if (req_has_async_data(req)) { 1278 1278 kmsg = req->async_data; 1279 + kmsg->msg.msg_control_user = sr->msg_control; 1279 1280 } else { 1280 1281 ret = io_sendmsg_copy_hdr(req, &iomsg); 1281 1282 if (ret)