From: Breno Leitao <leitao@debian.org>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Kanchan Joshi <joshi.k@samsung.com>
Subject: Re: [PATCH 1/1] io_uring: fix lost getsockopt completions
Date: Tue, 16 Jul 2024 11:48:04 -0700 [thread overview]
Message-ID: <ZpbAZB+InQKJlSVZ@gmail.com> (raw)
In-Reply-To: <ff349cf0654018189b6077e85feed935f0f8839e.1721149870.git.asml.silence@gmail.com>
On Tue, Jul 16, 2024 at 07:05:46PM +0100, Pavel Begunkov wrote:
> There is a report that iowq executed getsockopt never completes. The
> reason being that io_uring_cmd_sock() can return a positive result, and
> io_uring_cmd() propagates it back to core io_uring, instead of IOU_OK.
> In case of io_wq_submit_work(), the request will be dropped without
> completing it.
>
> The offending code was introduced by a hack in
> a9c3eda7eada9 ("io_uring: fix submission-failure handling for uring-cmd"),
> however it was fine until getsockopt was introduced and started
> returning positive results.
>
> The right solution is to always return IOU_OK, since
> e0b23d9953b0c ("io_uring: optimise ltimeout for inline execution"),
> we should be able to do it without problems, however for the sake of
> backporting and minimising side effects, let's keep returning negative
> return codes and otherwise do IOU_OK.
>
> Link: https://github.com/axboe/liburing/issues/1181
> Cc: stable@vger.kernel.org
> Fixes: 8e9fad0e70b7b ("io_uring: Add io_uring command support for sockets")
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Thanks for the fix.
next prev parent reply other threads:[~2024-07-16 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 18:05 [PATCH 1/1] io_uring: fix lost getsockopt completions Pavel Begunkov
2024-07-16 18:48 ` Breno Leitao [this message]
2024-07-18 20:34 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZpbAZB+InQKJlSVZ@gmail.com \
--to=leitao@debian.org \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=joshi.k@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.