io_uring: improve import_fixed overflow checks
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 1 Apr 2021 14:43:54 +0000 (15:43 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 4 Apr 2021 21:28:42 +0000 (15:28 -0600)
commit591d1a7c18c4c6596d40e3e056895fecc21756b7
tree5a934e321c557d88531f711b5b15403877130033
parentfa27dc3e0f4595c78e8dac51ce304969290eac67
io_uring: improve import_fixed overflow checks

Replace a hand-coded overflow check with a specialised function. Even
though compilers are smart enough to generate identical binary (i.e.
check carry bit), but it's more foolproof and conveys the intention
better.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e437dcdc929bacbb6f11a4824ecbbf17225cb82a.1617287883.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c