Skip to content

Commit

Permalink
io_uring: fix mshot io-wq checks
Browse files Browse the repository at this point in the history
[ Upstream commit 3a96378 ]

When checking for concurrent CQE posting, we're not only interested in
requests running from the poll handler but also strayed requests ended
up in normal io-wq execution. We're disallowing multishots in general
from io-wq, not only when they came in a certain way.

Cc: stable@vger.kernel.org
Fixes: 17add5c ("io_uring: force multishot CQEs into task context")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d8c5b36a39258036f93301cd60d3cd295e40653d.1709905727.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
isilence authored and gregkh committed Apr 3, 2024
1 parent 847937b commit 10c1fa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io_uring/net.c
Expand Up @@ -87,7 +87,7 @@ static inline bool io_check_multishot(struct io_kiocb *req,
* generic paths but multipoll may decide to post extra cqes.
*/
return !(issue_flags & IO_URING_F_IOWQ) ||
!(issue_flags & IO_URING_F_MULTISHOT) ||
!(req->flags & REQ_F_APOLL_MULTISHOT) ||
!req->ctx->task_complete;
}

Expand Down

0 comments on commit 10c1fa9

Please sign in to comment.