Skip to content

Commit

Permalink
man/man/io_uring_sqe_set_data: add note on ->user_data validity
Browse files Browse the repository at this point in the history
It must ALWAYS be set if an application relies on the value for all
completions, if not an application may see previous values in there
as liburing does not initialize this field.

Link: #1265
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Oct 12, 2024
1 parent dd1aa10 commit c33234a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions man/io_uring_sqe_set_data.3
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ or
can be called to retrieve the data pointer or value associated with the
submitted request.

Note that if neither of these functions are called, or the
.I user_data
field in the
.IR sqe
isn't set manually either, then the field may contain a value from a previous
use of this sqe. If an application relies on always having a valid
.I user_data
value present, it must always assign one to each sqe.

.SH RETURN VALUE
None
.SH SEE ALSO
Expand Down

0 comments on commit c33234a

Please sign in to comment.