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

io_uring: don't convert to jiffies for waiting on timeouts

If an application calls io_uring_enter(2) with a timespec passed in,
convert that timespec to ktime_t rather than jiffies. The latter does
not provide the granularity the application may expect, and may in
fact provided different granularity on different systems, depending
on what the HZ value is configured at.

Turn the timespec into an absolute ktime_t, and use that with
schedule_hrtimeout() instead.

Link: https://github.com/axboe/liburing/issues/531


Cc: stable@vger.kernel.org
Reported-by: default avatarBob Chen <chenbo.chen@alibaba-inc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f240762f
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