Skip to content

Commit

Permalink
io_uring: fix multishot ending when not polled
Browse files Browse the repository at this point in the history
If multishot is not actually polling then return IOU_OK rather than the
result.
If the result was > 0 this will confuse things further up the callstack
which expect a return <= 0.

Fixes: 1300ebb ("io_uring: multishot recv")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220708181838.1495428-2-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Dylan Yudaken authored and Jens Axboe committed Jul 25, 2022
1 parent 43e0bbb commit e2df2cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, unsigned int c

if (req->flags & REQ_F_POLLED)
*ret = IOU_STOP_MULTISHOT;
else
*ret = IOU_OK;
return true;
}

Expand Down

0 comments on commit e2df2cc

Please sign in to comment.