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@xxxxxxxxxxxxxxx > Fixes: 8e9fad0e70b7b ("io_uring: Add io_uring command support for sockets") > Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx> Thanks for the fix.