DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index
@ 2021-05-19  7:59 Haiyue Wang
  2021-05-20  1:23 ` Xing, Beilei
  0 siblings, 1 reply; 3+ messages in thread
From: Haiyue Wang @ 2021-05-19  7:59 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, Haiyue Wang, stable, Jingjing Wu, Beilei Xing

The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.

Cc: stable@dpdk.org
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d688c31cfb..cb38fe81e1 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
 	/* configure RSS key */
 	if (!rss_conf->rss_key) {
 		/* Calculate the default hash key */
-		for (i = 0; i <= vf->vf_res->rss_key_size; i++)
+		for (i = 0; i < vf->vf_res->rss_key_size; i++)
 			vf->rss_key[i] = (uint8_t)rte_rand();
 	} else
 		rte_memcpy(vf->rss_key, rss_conf->rss_key,
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-27  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  7:59 [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index Haiyue Wang
2021-05-20  1:23 ` Xing, Beilei
2021-05-27  9:51   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).