[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YiWxN/TJ7nHY8OMa@shredder>
Date: Mon, 7 Mar 2022 09:16:07 +0200
From: Ido Schimmel <idosch@...sch.org>
To: trix@...hat.com
Cc: davem@...emloft.net, kuba@...nel.org, nathan@...nel.org,
ndesaulniers@...gle.com, idosch@...dia.com, petrm@...dia.com,
edumazet@...gle.com, avagin@...il.com, yajun.deng@...ux.dev,
johannes.berg@...el.com, cong.wang@...edance.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] net: rtnetlink: fix error handling in
rtnl_fill_statsinfo()
On Sat, Mar 05, 2022 at 10:13:46AM -0800, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
>
> The clang static analyzer reports this issue
> rtnetlink.c:5481:2: warning: Undefined or garbage
> value returned to caller
> return err;
> ^~~~~~~~~~
>
> There is a function level err variable, in the
> list_for_each_entry_rcu block there is a shadow
> err. Remove the shadow.
>
> In the same block, the call to nla_nest_start_noflag()
> can fail without setting an err. Set the err
> to -EMSGSIZE.
>
> Fixes: 216e690631f5 ("net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns")
> Signed-off-by: Tom Rix <trix@...hat.com>
For net-next:
Reviewed-by: Ido Schimmel <idosch@...dia.com>
Thanks
Powered by blists - more mailing lists