[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ccacedd-41d9-f33c-25de-ae16bcdb7b08@kernel.dk>
Date: Mon, 6 May 2019 10:21:47 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Colin King <colin.king@...onical.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] io_uring: fix shadowed variable ret return code being not
checked
On 5/5/19 4:01 PM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Currently variable ret is declared in a while-loop code block that
> shadows another variable ret. When an error occurs in the while-loop
> the error return in ret is not being set in the outer code block and
> so the error check on ret is always going to be checking on the wrong
> ret variable resulting in check that is always going to be true and
> a premature return occurs.
>
> Fix this by removing the declaration of the inner while-loop variable
> ret so that shadowing does not occur.
Thanks, applied.
--
Jens Axboe
Powered by blists - more mailing lists