diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-04 03:43:10 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-07-04 03:43:10 +0200 |
commit | 4f52875366bfbd6ddc19c1045b603d853e0a889c (patch) | |
tree | a9255c2686b224e9ffdedfada20c9d358c5f0e83 /io_uring/net.c | |
parent | Merge tag 'hsi-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/... (diff) | |
parent | io_uring: flush offloaded and delayed task_work on exit (diff) | |
download | linux-4f52875366bfbd6ddc19c1045b603d853e0a889c.tar.xz linux-4f52875366bfbd6ddc19c1045b603d853e0a889c.zip |
Merge tag 'io_uring-6.5-2023-07-03' of git://git.kernel.dk/linux
Pull io_uring fixes from Jens Axboe:
"The fix for the msghdr->msg_inq assigned value being wrong, using -1
instead of -1U for the signed type.
Also a fix for ensuring when we're trying to run task_work on an
exiting task, that we wait for it. This is not really a correctness
thing as the work is being canceled, but it does help with ensuring
file descriptors are closed when the task has exited."
* tag 'io_uring-6.5-2023-07-03' of git://git.kernel.dk/linux:
io_uring: flush offloaded and delayed task_work on exit
io_uring: remove io_fallback_tw() forward declaration
io_uring/net: use proper value for msg_inq
Diffstat (limited to 'io_uring/net.c')
-rw-r--r-- | io_uring/net.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index d7e6efe89f48..eb1f51ddcb23 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -631,7 +631,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, unsigned int cflags; cflags = io_put_kbuf(req, issue_flags); - if (msg->msg_inq && msg->msg_inq != -1U) + if (msg->msg_inq && msg->msg_inq != -1) cflags |= IORING_CQE_F_SOCK_NONEMPTY; if (!(req->flags & REQ_F_APOLL_MULTISHOT)) { @@ -646,7 +646,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, io_recv_prep_retry(req); /* Known not-empty or unknown state, retry */ if (cflags & IORING_CQE_F_SOCK_NONEMPTY || - msg->msg_inq == -1U) + msg->msg_inq == -1) return false; if (issue_flags & IO_URING_F_MULTISHOT) *ret = IOU_ISSUE_SKIP_COMPLETE; @@ -805,7 +805,7 @@ retry_multishot: flags |= MSG_DONTWAIT; kmsg->msg.msg_get_inq = 1; - kmsg->msg.msg_inq = -1U; + kmsg->msg.msg_inq = -1; if (req->flags & REQ_F_APOLL_MULTISHOT) { ret = io_recvmsg_multishot(sock, sr, kmsg, flags, &mshot_finished); @@ -903,7 +903,7 @@ retry_multishot: if (unlikely(ret)) goto out_free; - msg.msg_inq = -1U; + msg.msg_inq = -1; msg.msg_flags = 0; flags = sr->msg_flags; |