]> git.baikalelectronics.ru Git - kernel.git/commit
splice: move f_mode checks to do_{splice,tee}()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 May 2020 19:39:35 +0000 (22:39 +0300)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 May 2020 15:45:07 +0000 (09:45 -0600)
commit90da2e3f25c8b4d742b2687b8fed8fc4eb8851da
tree6937c8d00b23be9016972d3000838338f9a09a6d
parent7f13657d141346125f4d0bb93eab4777f40c406e
splice: move f_mode checks to do_{splice,tee}()

do_splice() is used by io_uring, as will be do_tee(). Move f_mode
checks from sys_{splice,tee}() to do_{splice,tee}(), so they're
enforced for io_uring as well.

Fixes: 7d67af2c0134 ("io_uring: add splice(2) support")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/splice.c