]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix zero len do_splice()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 4 May 2020 20:00:54 +0000 (23:00 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 9 May 2020 16:16:10 +0000 (10:16 -0600)
commitbaaea83edd4bf0b4d0e2985aab5c5fa0c2efe46b
treecae6a3895c52a37ab4215f262e76c319d78a8dbd
parent147d342c88f3ddea1433e50e3ebdb8e596ee847f
io_uring: fix zero len do_splice()

do_splice() doesn't expect len to be 0. Just always return 0 in this
case as splice(2) does.

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/io_uring.c