Files
linux/net
Tom Rix 57d29a2935 net: rtnetlink: fix error handling in rtnl_fill_statsinfo()
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: 216e690631 ("net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns")
Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-03-07 12:26:53 +00:00
..
2022-01-22 08:33:37 +02:00
2022-03-07 11:40:41 +00:00
2022-03-07 11:40:41 +00:00
2022-03-04 12:02:19 +00:00
2022-03-04 12:02:19 +00:00
2022-03-06 11:05:31 +00:00
2022-01-27 13:53:27 +00:00
2022-03-02 22:44:49 -08:00
2022-01-26 07:44:01 +01:00
2022-02-10 15:29:39 +00:00
2022-03-04 21:54:30 -08:00
2022-03-07 11:40:41 +00:00
2022-03-07 11:40:41 +00:00
2022-03-06 11:05:31 +00:00
2021-06-03 15:13:56 -07:00
2022-03-03 09:55:28 +00:00
2021-07-29 15:06:49 +01:00