]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
io_uring/net: avoid sending -ECONNABORTED on repeated connection requests
authorJens Axboe <axboe@kernel.dk>
Mon, 20 Mar 2023 17:13:49 +0000 (11:13 -0600)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:39 +0000 (13:33 +0200)
commitf302fee941d1043f2f861878304223913ab5686f
tree0ea219959dd7fd709a3a8b3cfa23ecc52e63b7ba
parentbe13d8dfe3b7cff24dd6893543d0ee2ef38085d1
io_uring/net: avoid sending -ECONNABORTED on repeated connection requests

BugLink: https://bugs.launchpad.net/bugs/2016877
commit 74e2e17ee1f8d8a0928b90434ad7e2df70f8483e upstream.

Since io_uring does nonblocking connect requests, if we do two repeated
ones without having a listener, the second will get -ECONNABORTED rather
than the expected -ECONNREFUSED. Treat -ECONNABORTED like a normal retry
condition if we're nonblocking, if we haven't already seen it.

Cc: stable@vger.kernel.org
Fixes: 3fb1bd688172 ("io_uring/net: handle -EINPROGRESS correct for IORING_OP_CONNECT")
Link: https://github.com/axboe/liburing/issues/828
Reported-by: Hui, Chunyang <sanqian.hcy@antgroup.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
io_uring/net.c