Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • io_uring
  • uring_cmd.c
Find file BlameHistoryPermalink
  • Pavel Begunkov's avatar
    io_uring: fix lost getsockopt completions · 24dce1c5
    Pavel Begunkov authored Jul 16, 2024
    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
    a9c3eda7 ("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
    e0b23d99 ("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: 8e9fad0e
    
     ("io_uring: Add io_uring command support for sockets")
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
    Link: https://lore.kernel.org/r/ff349cf0654018189b6077e85feed935f0f8839e.1721149870.git.asml.silence@gmail.com
    
    
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    24dce1c5
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7