io_uring: move io_uring_rsrc_update2 validation
authorDylan Yudaken <dylany@fb.com>
Tue, 12 Apr 2022 16:30:39 +0000 (09:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 07:34:12 +0000 (09:34 +0200)
commit22aa1597f462d2a917d1c6124cb33f520949936d
tree282c19805ca3f4d7da8c8e126209328a8c7fefba
parentcb981d5c751197b95075e707179aee9cf63a1cac
io_uring: move io_uring_rsrc_update2 validation

[ Upstream commit 565c5e616e8061b40a2e1d786c418a7ac3503a8d ]

Move validation to be more consistently straight after
copy_from_user. This is already done in io_register_rsrc_update and so
this removes that redundant check.

Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220412163042.2788062-2-dylany@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/io_uring.c