]> 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)
commite934236721dc79a70cffb07db120a6f367c41bd4
tree6937c8d00b23be9016972d3000838338f9a09a6d
parent440d8542ace7e987477ff83ac4c0d5b571610c19
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: 5d20f1fc35ba ("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