Skip to content

Commit

Permalink
io_uring/net: fix zc send link failing
Browse files Browse the repository at this point in the history
Failed requests should be marked with req_set_fail(), so links and cqe
skipping work correctly, which is missing in io_sendzc(). Note,
io_sendzc() return IOU_OK on failure, so the core code won't do the
cleanup for us.

Fixes: 06a5464 ("io_uring: wire send zc request type")
Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/e47d46fda9db30154ce66a549bb0d3380b780520.1661342812.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Aug 24, 2022
1 parent 2cacedc commit 5a848b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
}
if (ret == -ERESTARTSYS)
ret = -EINTR;
req_set_fail(req);
} else if (zc->flags & IORING_RECVSEND_NOTIF_FLUSH) {
io_notif_slot_flush_submit(notif_slot, 0);
}
Expand Down

0 comments on commit 5a848b7

Please sign in to comment.