Re: [PATCH for-5.7] io_uring: fix zero len do_splice()

2020-05-09 Thread Jens Axboe
On 5/9/20 10:07 AM, Pavel Begunkov wrote: > On 04/05/2020 23:00, Pavel Begunkov wrote: >> do_splice() doesn't expect len to be 0. Just always return 0 in this >> case as splice(2) do. >> > > If it was missed, may you take a look? I reattached the patch btw killing > reported warnings. Thanks for

Re: [PATCH for-5.7] io_uring: fix zero len do_splice()

2020-05-09 Thread Pavel Begunkov
On 04/05/2020 23:00, Pavel Begunkov wrote: > do_splice() doesn't expect len to be 0. Just always return 0 in this > case as splice(2) do. > If it was missed, may you take a look? I reattached the patch btw killing reported warnings. --- From: Pavel Begunkov Subject: [PATCH] io_uring: fix zero

Re: [PATCH for-5.7] io_uring: fix zero len do_splice()

2020-05-04 Thread Pavel Begunkov
On 04/05/2020 23:00, Pavel Begunkov wrote: > do_splice() doesn't expect len to be 0. Just always return 0 in this > case as splice(2) do. There is a thing, splice/tee will always return success on len=0 even with invalid fds. Fast return for len=0, should really has been done after basic

[PATCH for-5.7] io_uring: fix zero len do_splice()

2020-05-04 Thread Pavel Begunkov
do_splice() doesn't expect len to be 0. Just always return 0 in this case as splice(2) do. Fixes: 7d67af2c0134 ("io_uring: add splice(2) support") Reported-by: Jann Horn Signed-off-by: Pavel Begunkov --- fs/io_uring.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff