[dpdk-stable] patch 'net/mlx5: fix crash when meter action conf is null' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:04 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 4eecbd58009e2c6c2ebcd983a244a51b1b9aac41 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Date: Fri, 13 Dec 2019 22:21:34 +0800
Subject: [PATCH] net/mlx5: fix crash when meter action conf is null

[ upstream commit 4f19f4140e058c92822f228dcdc55c44bd88b613 ]

When offloading the meter, should check the action
conf and make sure it is valid.

Fixes: f46bf7488705 ("net/mlx5: support meter flow action")

Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Reviewed-by: Suanming Mou <suanmingm at mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e50d40040b..baf617aaa6 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3402,7 +3402,12 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const struct rte_flow_action_meter *am = action->conf;
-	struct mlx5_flow_meter *fm = mlx5_flow_meter_find(priv, am->mtr_id);
+	struct mlx5_flow_meter *fm;
+
+	if (!am)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
+					  "meter action conf is NULL");
 
 	if (action_flags & MLX5_FLOW_ACTION_METER)
 		return rte_flow_error_set(error, ENOTSUP,
@@ -3417,6 +3422,7 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
 					  "meter action not supported");
+	fm = mlx5_flow_meter_find(priv, am->mtr_id);
 	if (!fm)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:41.073083208 +0000
+++ 0058-net-mlx5-fix-crash-when-meter-action-conf-is-null.patch	2020-02-11 11:17:38.440002095 +0000
@@ -1,13 +1,14 @@
-From 4f19f4140e058c92822f228dcdc55c44bd88b613 Mon Sep 17 00:00:00 2001
+From 4eecbd58009e2c6c2ebcd983a244a51b1b9aac41 Mon Sep 17 00:00:00 2001
 From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
 Date: Fri, 13 Dec 2019 22:21:34 +0800
 Subject: [PATCH] net/mlx5: fix crash when meter action conf is null
 
+[ upstream commit 4f19f4140e058c92822f228dcdc55c44bd88b613 ]
+
 When offloading the meter, should check the action
 conf and make sure it is valid.
 
 Fixes: f46bf7488705 ("net/mlx5: support meter flow action")
-Cc: stable at dpdk.org
 
 Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
 Reviewed-by: Suanming Mou <suanmingm at mellanox.com>
@@ -16,7 +17,7 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 4c162816e4..5bd1b1cdb7 100644
+index e50d40040b..baf617aaa6 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
 @@ -3402,7 +3402,12 @@ mlx5_flow_validate_action_meter(struct rte_eth_dev *dev,


More information about the stable mailing list