]> git.baikalelectronics.ru Git - kernel.git/commit
net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns
authorPetr Machata <petrm@nvidia.com>
Wed, 2 Mar 2022 16:31:19 +0000 (18:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Mar 2022 10:37:22 +0000 (10:37 +0000)
commitadf8365b9317a655c3d1cf2ea2eff2fe9a174d81
treee79e87a9c082f0dc324b54e06d399bd10fceb43a
parent5076a30c75160470b02dc8c2edc60d1a53935d21
net: rtnetlink: rtnl_fill_statsinfo(): Permit non-EMSGSIZE error returns

Obtaining stats for the IFLA_STATS_LINK_OFFLOAD_XSTATS nest involves a HW
access, and can fail for more reasons than just netlink message size
exhaustion. Therefore do not always return -EMSGSIZE on the failure path,
but respect the error code provided by the callee. Set the error explicitly
where it is reasonable to assume -EMSGSIZE as the failure reason.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c