[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdkBshMOSezpbu_CV6CuK23W42Vgw=dNS1X6aga+KaL_cQ@mail.gmail.com>
Date: Tue, 9 Jul 2019 16:16:37 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Dennis Dalessandro <dennis.dalessandro@...el.com>,
Mike Marciniszyn <mike.marciniszyn@...el.com>,
Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Kamenee Arumugam <kamenee.arumugam@...el.com>,
linux-rdma@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v2] IB/rdmavt: Fix variable shadowing issue in rvt_create_cq
On Tue, Jul 9, 2019 at 4:06 PM Nathan Chancellor
<natechancellor@...il.com> wrote:
> The function scoped err variable is uninitialized when the flow jumps
> into the if statement. The if scoped err variable shadows the function
> scoped err variable, preventing the err assignments within the if
> statement to be reflected at the function level, which will cause
> uninitialized use when the goto statements are taken.
>
> Just remove the if scoped err declaration so that there is only one
> copy of the err variable for this function.
>
> Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory")
> Link: https://github.com/ClangBuiltLinux/linux/issues/594
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> ---
>
> v1 -> v2:
>
> * Updated the wording of the commit message to use proper terms like
> scoping and shadowing, thanks to review from Nick (let me know if the
> wording isn't up to snuff).
LGTM thanks for following up w/ v2.
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists