Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
io_uring/uring_cmd: unconditionally copy SQEs at prep time
This isn't generally necessary, but conditions have been observed where SQE data is accessed from the original SQE after prep has been done and outside of the initial issue. Opcode prep handlers must ensure that any SQE related data is stable beyond the prep phase, but uring_cmd is a bit special in how it handles the SQE which makes it susceptible to reading stale data. If the application has reused the SQE before the original completes, then that can lead to data corruption. Down the line we can relax this again once uring_cmd has been sanitized a bit, and avoid unnecessarily copying the SQE. Fixes: 5eff57f ("io_uring/uring_cmd: defer SQE copying until it's needed") Reported-by: Caleb Sander Mateos <[email protected]> Reviewed-by: Caleb Sander Mateos <[email protected]> Reviewed-by: Li Zetao <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information