[dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Wed Nov 21 17:04:00 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.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 11/26/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey at solarflare.com>
Date: Mon, 10 Sep 2018 10:33:15 +0100
Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to

[ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ]

Size of provided memory should be consistent with specified size.

Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")

Signed-off-by: Martin Harvey <mharvey at solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
 drivers/net/sfc/base/mcdi_mon.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
index 8c0b6f0d9..54f7ae5db 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
@@ -302,4 +302,10 @@ efx_mcdi_read_sensors(
 			    MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
 	uint32_t addr_lo, addr_hi;
+	efx_rc_t rc;
+
+	if (EFSYS_MEM_SIZE(esmp) < size) {
+		rc = EINVAL;
+		goto fail1;
+	}
 
 	req.emr_cmd = MC_CMD_READ_SENSORS;
@@ -319,4 +325,9 @@ efx_mcdi_read_sensors(
 
 	return (req.emr_rc);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.874564522 +0000
+++ 0010-net-sfc-base-check-size-of-memory-to-read-sensors-da.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From 252faf84f41e6d726d3ab0f9b7544723756afcca Mon Sep 17 00:00:00 2001
+From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey at solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:15 +0100
 Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to
 
+[ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ]
+
 Size of provided memory should be consistent with specified size.
 
 Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
-Cc: stable at dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey at solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
@@ -15,10 +16,10 @@
  1 file changed, 11 insertions(+)
 
 diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
-index 93e6b1e35..68bbc575d 100644
+index 8c0b6f0d9..54f7ae5db 100644
 --- a/drivers/net/sfc/base/mcdi_mon.c
 +++ b/drivers/net/sfc/base/mcdi_mon.c
-@@ -195,4 +195,10 @@ efx_mcdi_read_sensors(
+@@ -302,4 +302,10 @@ efx_mcdi_read_sensors(
  			    MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
  	uint32_t addr_lo, addr_hi;
 +	efx_rc_t rc;
@@ -29,7 +30,7 @@
 +	}
  
  	req.emr_cmd = MC_CMD_READ_SENSORS;
-@@ -212,4 +218,9 @@ efx_mcdi_read_sensors(
+@@ -319,4 +325,9 @@ efx_mcdi_read_sensors(
  
  	return (req.emr_rc);
 +


More information about the stable mailing list