Skip to content

Commit c7adbe2

Browse files
committed
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
2 parents 90d3eaa + ff81dad commit c7adbe2

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

include/linux/io_uring_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum {
1313
* A hint to not wake right away but delay until there are enough of
1414
* tw's queued to match the number of CQEs the task is waiting for.
1515
*
16-
* Must not be used wirh requests generating more than one CQE.
16+
* Must not be used with requests generating more than one CQE.
1717
* It's also ignored unless IORING_SETUP_DEFER_TASKRUN is set.
1818
*/
1919
IOU_F_TWQ_LAZY_WAKE = 1,

io_uring/io_uring.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,19 +2602,6 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
26022602
if (__io_cqring_events_user(ctx) >= min_events)
26032603
return 0;
26042604

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-
26182605
init_waitqueue_func_entry(&iowq.wq, io_wake_function);
26192606
iowq.wq.private = current;
26202607
INIT_LIST_HEAD(&iowq.wq.entry);
@@ -2633,6 +2620,19 @@ static int io_cqring_wait(struct io_ring_ctx *ctx, int min_events,
26332620
io_napi_adjust_timeout(ctx, &iowq, &ts);
26342621
}
26352622

2623+
if (sig) {
2624+
#ifdef CONFIG_COMPAT
2625+
if (in_compat_syscall())
2626+
ret = set_compat_user_sigmask((const compat_sigset_t __user *)sig,
2627+
sigsz);
2628+
else
2629+
#endif
2630+
ret = set_user_sigmask(sig, sigsz);
2631+
2632+
if (ret)
2633+
return ret;
2634+
}
2635+
26362636
io_napi_busy_loop(ctx, &iowq);
26372637

26382638
trace_io_uring_cqring_wait(ctx, min_events);

io_uring/net.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
12761276

12771277
if (req_has_async_data(req)) {
12781278
kmsg = req->async_data;
1279+
kmsg->msg.msg_control_user = sr->msg_control;
12791280
} else {
12801281
ret = io_sendmsg_copy_hdr(req, &iomsg);
12811282
if (ret)

0 commit comments

Comments
 (0)