Skip to content
Commit fdd1dc31 authored by Colin Ian King's avatar Colin Ian King Committed by Jens Axboe
Browse files

io_uring: Fix incorrect sizeof operator for copy_from_user call



Static analysis is warning that the sizeof being used is should be
of *data->tags[i] and not data->tags[i]. Although these are the same
size on 64 bit systems it is not a portable assumption to assume
this is true for all cases.  Fix this by using a temporary pointer
tag_slot to make the code a clearer.

Addresses-Coverity: ("Sizeof not portable")
Fixes: d878c816 ("io_uring: hide rsrc tag copy into generic helpers")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/20210615130011.57387-1-colin.king@canonical.com


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