Skip to content
Commit 695ab28a authored by Jens Axboe's avatar Jens Axboe Committed by Sasha Levin
Browse files

io_uring: fix xa_alloc_cycle() error return value check



[ upstream commit a30f895a ]

We currently check for ret != 0 to indicate error, but '1' is a valid
return and just indicates that the allocation succeeded with a wrap.
Correct the check to be for < 0, like it was before the xarray
conversion.

Cc: stable@vger.kernel.org
Fixes: 61cf9370 ("io_uring: Convert personality_idr to XArray")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0d5fcfc6
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