io_uring/net: ensure async prep handlers always initialize ->done_io
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Mar 2024 22:36:23 +0000 (16:36 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 16 Mar 2024 16:33:19 +0000 (10:33 -0600)
commitf3a640cca951ef9715597e68f5363afc0f452a88
tree185f47a526b39c0b5aac3915f16542029a6ba110
parent2b35b8b43e07b1a6f06fdd84cf4b9eb24785896d
io_uring/net: ensure async prep handlers always initialize ->done_io

If we get a request with IOSQE_ASYNC set, then we first run the prep
async handlers. But if we then fail setting it up and want to post
a CQE with -EINVAL, we use ->done_io. This was previously guarded with
REQ_F_PARTIAL_IO, and the normal setup handlers do set it up before any
potential errors, but we need to cover the async setup too.

Fixes: 9817ad85899f ("io_uring/net: remove dependency on REQ_F_PARTIAL_IO for sr->done_io")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c