Skip to content
Commit dbd0f6d6 authored by Zhengyuan Liu's avatar Zhengyuan Liu Committed by Jens Axboe
Browse files

io_uring: fix the sequence comparison in io_sequence_defer



sq->cached_sq_head and cq->cached_cq_tail are both unsigned int. If
cached_sq_head overflows before cached_cq_tail, then we may miss a
barrier req. As cached_cq_tail always follows cached_sq_head, the NQ
should be enough.

Cc: stable@vger.kernel.org
Fixes: de0617e4 ("io_uring: add support for marking commands as draining")
Signed-off-by: default avatarZhengyuan Liu <liuzhengyuan@kylinos.cn>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9637d517
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