aboutsummaryrefslogtreecommitdiff
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-09-26 07:08:10 -0600
committerJens Axboe <axboe@kernel.dk>2024-09-30 08:26:59 -0600
commitc314094cb4cfa6fc5a17f4881ead2dfebfa717a7 (patch)
treeb72881761ebed453619e07b87a4b6522253a726b /rust/helpers/mutex.c
parent17ea56b752b6ba58fdd1fcfd24f0fd2fa2b0ade2 (diff)
io_uring/net: harden multishot termination case for recv
If the recv returns zero, or an error, then it doesn't matter if more data has already been received for this buffer. A condition like that should terminate the multishot receive. Rather than pass in the collected return value, pass in whether to terminate or keep the recv going separately. Note that this isn't a bug right now, as the only way to get there is via setting MSG_WAITALL with multishot receive. And if an application does that, then -EINVAL is returned anyway. But it seems like an easy bug to introduce, so let's make it a bit more explicit. Link: https://github.com/axboe/liburing/issues/1246 Cc: stable@vger.kernel.org Fixes: b3fdea6ecb55 ("io_uring: multishot recv") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions