]> Git Repo - linux.git/commit
nexthop: fix uninitialized variable in nla_put_nh_group_stats()
authorDan Carpenter <[email protected]>
Thu, 21 Mar 2024 14:42:18 +0000 (17:42 +0300)
committerJakub Kicinski <[email protected]>
Sat, 23 Mar 2024 01:03:29 +0000 (18:03 -0700)
commit9145e2249ed68af99fdbbbf6111aaf0e2dfb72d0
treef9ab836d2c2bbcc35f084da8094635c9cd41bb48
parentf6c8f5e8694c7a78c94e408b628afa6255cc428a
nexthop: fix uninitialized variable in nla_put_nh_group_stats()

The "*hw_stats_used" value needs to be set on the success paths to prevent
an uninitialized variable bug in the caller, nla_put_nh_group_stats().

Fixes: 5072ae00aea4 ("net: nexthop: Expose nexthop group HW stats to user space")
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Jiri Pirko <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
net/ipv4/nexthop.c
This page took 0.052457 seconds and 4 git commands to generate.