Skip to content
Commit 0fef9483 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring: make offset == -1 consistent with preadv2/pwritev2



The man page for io_uring generally claims were consistent with what
preadv2 and pwritev2 accept, but turns out there's a slight discrepancy
in how offset == -1 is handled for pipes/streams. preadv doesn't allow
it, but preadv2 does. This currently causes io_uring to return -EINVAL
if that is attempted, but we should allow that as documented.

This change makes us consistent with preadv2/pwritev2 for just passing
in a NULL ppos for streams if the offset is -1.

Cc: stable@vger.kernel.org # v5.7+
Reported-by: default avatarBenedikt Ames <wisp3rwind@posteo.eu>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 00d23d51
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment