Skip to content
Commit 92cb6e2e authored by ZiyangZhang's avatar ZiyangZhang Committed by Jens Axboe
Browse files

ublk_drv: update iod->addr for UBLK_IO_NEED_GET_DATA



If ublksrv sends UBLK_IO_NEED_GET_DATA with new allocated io buffer, we
have to update iod->addr in task_work before calling io_uring_cmd_done().
Then usersapce target can handle (write)io request with the new io
buffer reading from updated iod.

Without this change, userspace target may touch a wrong io buffer!

Signed-off-by: default avatarZiyangZhang <ZiyangZhang@linux.alibaba.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220810055212.66417-1-ZiyangZhang@linux.alibaba.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent aa0c680c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment