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>
Mon, 12 Apr 2021 01:30:34 +0000 (19:30 -0600)
commit75769e3f7357171dbe040a5ed55445c2642295d1
tree8e63709e8e711ec094cb354ba764ce2eaec49cc7
parent0aec38fda2b6e36c0b066a87ff727ace3666cade
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