Skip to content
Commit a4d416dc authored by linke li's avatar linke li Committed by Jens Axboe
Browse files

io_uring/msg_ring: reuse ctx->submitter_task read using READ_ONCE instead of re-reading it



In io_msg_exec_remote(), ctx->submitter_task is read using READ_ONCE at
the beginning of the function, checked, and then re-read from
ctx->submitter_task, voiding all guarantees of the checks. Reuse the value
that was read by READ_ONCE to ensure the consistency of the task struct
throughout the function.

Signed-off-by: default avatarlinke li <lilinke99@qq.com>
Link: https://lore.kernel.org/r/tencent_F9B2296C93928D6F68FF0C95C33475C68209@qq.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 039a2e80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment