[dpdk-stable] patch 'net/mlx5: fix RSS flow action bounds check'	has been queued to stable release 18.02.2
    luca.boccassi at gmail.com 
    luca.boccassi at gmail.com
       
    Mon Apr 30 16:53:37 CEST 2018
    
    
  
Hi,
FYI, your patch has been queued to stable release 18.02.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From 33993e25783fb68ab233e4f9aa71c670cea1049e Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Date: Thu, 19 Apr 2018 12:07:29 +0200
Subject: [PATCH] net/mlx5: fix RSS flow action bounds check
[ upstream commit e68744e53ed209c0419925171c5aa510f6643adb ]
The number of queues provided by the application is not checked against
parser's supported maximum.
Fixes: 3d821d6fea40 ("net/mlx5: support RSS action flow rule")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bf718f894..8a5565b30 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -16,6 +16,7 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
+#include <rte_common.h>
 #include <rte_ethdev_driver.h>
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
@@ -698,6 +699,14 @@ priv_flow_convert_actions(struct priv *priv,
 					return -rte_errno;
 				}
 			}
+			if (rss->num > RTE_DIM(parser->queues)) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ACTION,
+						   actions,
+						   "too many queues for RSS"
+						   " context");
+				return -rte_errno;
+			}
 			for (n = 0; n < rss->num; ++n) {
 				if (rss->queue[n] >= priv->rxqs_n) {
 					rte_flow_error_set(error, EINVAL,
-- 
2.14.2
    
    
More information about the stable
mailing list