io_uring-6.9-20240412

-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmYZWJQQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgprlZEACKCVoeCG6JJ5u4do3YvQcYu4cYHAkixCqj
 wFJnJ+vZBvv/DLi04SjKPZWFWiR3z4GFGEkZxgOakLYxJRQ8gnvosn65V/aH8qMR
 UK03E6fFt5hQ1lgUMbn0HyiiUsoDzsx/WkrQHYr/aQaxgW5827qWPZuKIvRzA6dy
 gPT8Rxcr+IJMcm1iwdiLQbKScFznUzHAmBpE9TXc8rqHRVAzSbd+i8CpVB6+UJGY
 ftkkPQsRRa3PGtQO5Q23F48XI22gRFwDw6x2odieAPGIyNrt8DIIexJeknhJ7JOl
 j5/XAupmS3tNen+scd7l3fD/jToH5yO2a3VpbW6s2ptwHaMVpqRUmCP2BsA6FgSi
 q31GeQC5UJwKc6Bhj5iUZ3HgrTj50V4zobGbb3XNlMfqf+zmKWYm8c56Wl78Jm1X
 WkGIJrxKsRs9ewVxFAm3uYi4SFE1+YNiNTcrHX/d8E93mgoLb0j2z8ay1eWPOY1k
 F4alHFyWEVP/8EQJPfTj2R/EjztHHkzTx+2GPU/dEAVqgs61Hhghwpo/shT/jLrQ
 I0I28+VhBjA2hy6ZZGA6HRQTP7UhMOnR9CmW7ldRse0a9r6UittBaZrABhVb3e0Q
 pw6KcwZNdANODkANS4s+hvce1PEYg5Y/a6OxXY8kTioXBRdjvH4PO3LRVPfN96Ii
 8PrOgM3eqA==
 =M7Ul
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2024-04-12 10:19:36 -07:00
commit c7adbe2eb7
3 changed files with 15 additions and 14 deletions

View File

@ -13,7 +13,7 @@ enum {
* A hint to not wake right away but delay until there are enough of
* tw's queued to match the number of CQEs the task is waiting for.
*
* Must not be used wirh requests generating more than one CQE.
* Must not be used with requests generating more than one CQE.
* It's also ignored unless IORING_SETUP_DEFER_TASKRUN is set.
*/
IOU_F_TWQ_LAZY_WAKE = 1,

View File

@ -2602,19 +2602,6 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
if (__io_cqring_events_user(ctx) >= min_events)
return 0;
if (sig) {
#ifdef CONFIG_COMPAT
if (in_compat_syscall())
ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig,
sigsz);
else
#endif
ret = set_user_sigmask(sig, sigsz);
if (ret)
return ret;
}
init_waitqueue_func_entry(&iowq.wq, io_wake_function);
iowq.wq.private = current;
INIT_LIST_HEAD(&iowq.wq.entry);
@ -2633,6 +2620,19 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
io_napi_adjust_timeout(ctx, &iowq, &ts);
}
if (sig) {
#ifdef CONFIG_COMPAT
if (in_compat_syscall())
ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig,
sigsz);
else
#endif
ret = set_user_sigmask(sig, sigsz);
if (ret)
return ret;
}
io_napi_busy_loop(ctx, &iowq);
trace_io_uring_cqring_wait(ctx, min_events);

View File

@ -1276,6 +1276,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
if (req_has_async_data(req)) {
kmsg = req->async_data;
kmsg->msg.msg_control_user = sr->msg_control;
} else {
ret = io_sendmsg_copy_hdr(req, &iomsg);
if (ret)