lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b2afc86d-cc37-7a46-b13f-560549509a0f@gmail.com>
Date:   Mon, 4 May 2020 18:22:00 +0300
From:   Pavel Begunkov <asml.silence@...il.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Jens Axboe <axboe@...nel.dk>,
        Alexander Viro <viro@...iv.linux.org.uk>
Cc:     io-uring@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] io_uring: Remove logically dead code in io_splice

On 04/05/2020 18:19, Gustavo A. R. Silva wrote:
> In case force_nonblock happens to be true, the function returns
> at:
> 
>  2779         if (force_nonblock)
>  2780                 return -EAGAIN;
> 
> before reaching this line of code. So, the null check on force_nonblock
> at 2785, is never actually being executed.
> 
> Addresses-Coverity-ID: 1492838 ("Logically dead code")
> Fixes: 2fb3e82284fc ("io_uring: punt splice async because of inode mutex")

It's not a bug, so 'Fixes' tag is IMHO misleading. Anyway,

Acked-by: Pavel Begunkov <asml.silence@...il.com>

> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> ---
>  fs/io_uring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index e5dfbbd2aa34..4b1efb062f7f 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -2782,7 +2782,7 @@ static int io_splice(struct io_kiocb *req, bool force_nonblock)
>  	poff_in = (sp->off_in == -1) ? NULL : &sp->off_in;
>  	poff_out = (sp->off_out == -1) ? NULL : &sp->off_out;
>  	ret = do_splice(in, poff_in, out, poff_out, sp->len, flags);
> -	if (force_nonblock && ret == -EAGAIN)
> +	if (ret == -EAGAIN)
>  		return -EAGAIN;
>  
>  	io_put_file(req, in, (sp->flags & SPLICE_F_FD_IN_FIXED));
> 

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ