io_uring: add ->splice_fd_in checks
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 13 Sep 2021 15:42:47 +0000 (09:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:05 +0000 (13:40 +0200)
commit54eb6211b979f21c4908719e8bfb005a1143e8c3
tree679c91e79594916de76c5774dd8bfad510ffa909
parenta3ed34bcada565ccd33fc61360fd8157c32b5636
io_uring: add ->splice_fd_in checks

commit 26578cda3db983b17cabe4e577af26306beb9987 upstream.

->splice_fd_in is used only by splice/tee, but no other request checks
it for validity. Add the check for most of request types excluding
reads/writes/sends/recvs, we don't want overhead for them and can leave
them be as is until the field is actually used.

Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f44bc2acd6777d932de3d71a5692235b5b2b7397.1629451684.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c