]> www.infradead.org Git - users/hch/misc.git/commit
io_uring: clean up a type in io_uring_register_get_file()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 16 Sep 2024 14:07:10 +0000 (17:07 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Sep 2024 18:04:10 +0000 (12:04 -0600)
commit2f6a55e4235f596b7dd9e8a7cf3e07f39ac5e9c2
treee52c754a90d2d14dea4432ec49b02c9baf06b2a4
parent7f44beadcc11adb98220556d2ddbe9c97aa6d42d
io_uring: clean up a type in io_uring_register_get_file()

Originally "fd" was unsigned int but it was changed to int when we pulled
this code into a separate function in commit 0b6d253e084a
("io_uring/register: provide helper to get io_ring_ctx from 'fd'").  This
doesn't really cause a runtime problem because the call to
array_index_nospec() will clamp negative fds to 0 and nothing else uses
the negative values.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/6f6cb630-079f-4fdf-bf95-1082e0a3fc6e@stanley.mountain
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/register.c
io_uring/register.h