summaryrefslogtreecommitdiff
path: root/include/uapi/linux/ethtool_netlink.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-06-08 19:23:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-21 17:01:00 +0300
commit33bd6b76ac772e87713bcce2c6352190762996bf (patch)
tree51d67c0829021bac5f39847de3eaa2c0812c9370 /include/uapi/linux/ethtool_netlink.h
parent277fbf63b34a377c800d25c7cfd8231ba19cffe2 (diff)
downloadlinux-33bd6b76ac772e87713bcce2c6352190762996bf.tar.xz
net: ethtool: correct MAX attribute value for stats
[ Upstream commit 52f79609c0c5b25fddb88e85f25ce08aa7e3fb42 ] When compiling YNL generated code compiler complains about array-initializer-out-of-bounds. Turns out the MAX value for STATS_GRP uses the value for STATS. This may lead to random corruptions in user space (kernel itself doesn't use this value as it never parses stats). Fixes: f09ea6fb1272 ("ethtool: add a new command for reading standard stats") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/uapi/linux/ethtool_netlink.h')
-rw-r--r--include/uapi/linux/ethtool_netlink.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
index bb57084ac524..69f5bec347c2 100644
--- a/include/uapi/linux/ethtool_netlink.h
+++ b/include/uapi/linux/ethtool_netlink.h
@@ -761,7 +761,7 @@ enum {
/* add new constants above here */
__ETHTOOL_A_STATS_GRP_CNT,
- ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1)
+ ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1)
};
enum {