Skip to content
Commit 649bb75d authored by Almog Khaikin's avatar Almog Khaikin Committed by Jens Axboe
Browse files

io_uring: fix memory ordering when SQPOLL thread goes to sleep



Without a full memory barrier between the store to the flags and the
load of the SQ tail the two operations can be reordered and this can
lead to a situation where the SQPOLL thread goes to sleep while the
application writes to the SQ tail and doesn't see the wakeup flag.
This memory barrier pairs with a full memory barrier in the application
between its store to the SQ tail and its load of the flags.

Signed-off-by: default avatarAlmog Khaikin <almogkh@gmail.com>
Link: https://lore.kernel.org/r/20220321090059.46313-1-almogkh@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f63cf519
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