diff options
author | Jens Axboe <axboe@kernel.dk> | 2025-01-15 16:39:15 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-15 16:39:15 +0100 |
commit | 6f7a644eb7db10f9993039bab7740f7982d4edf4 (patch) | |
tree | 343e6d3029d5234a3255cee532392f257eb72a26 /block/blk-iocost.c | |
parent | io_uring/register: document io_register_resize_rings() shared mem usage (diff) | |
download | linux-6f7a644eb7db10f9993039bab7740f7982d4edf4.tar.xz linux-6f7a644eb7db10f9993039bab7740f7982d4edf4.zip |
io_uring/register: cache old SQ/CQ head reading for copies
The SQ and CQ ring heads are read twice - once for verifying that it's
within bounds, and once inside the loops copying SQE and CQE entries.
This is technically incorrect, in case the values could get modified
in between verifying them and using them in the copy loop. While this
won't lead to anything truly nefarious, it may cause longer loop times
for the copies than expected.
Read the ring head values once, and use the verified value in the copy
loops.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-iocost.c')
0 files changed, 0 insertions, 0 deletions