]> git.droids-corp.org - dpdk.git/commit
net/bnxt: fix xstats names query overrun
authorLance Richardson <lance.richardson@broadcom.com>
Tue, 30 Nov 2021 14:42:26 +0000 (09:42 -0500)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Wed, 12 Jan 2022 01:11:09 +0000 (02:11 +0100)
commit8dcee14fbfca8c90cd09c88e0fda65819d82ded6
tree00112a42f56d09f9869f43762bf4c778d49cdb35
parent637582afcc886fc53c1dc7a3686cc771abad2cfd
net/bnxt: fix xstats names query overrun

When the xstats_names parameter to rte_eth_xstats_get_names()
is non-NULL and the size parameter is less than the required
number of entries, the driver must return the required size
without modifying (and over-running) the caller's xstats_names
array.

Update bnxt_dev_xstats_get_names_op() in accordance with this
requirement.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_stats.c