[dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Fri Nov 30 00:10:12 CET 2018
Hi,
FYI, your patch has been queued to LTS release 17.11.5
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/01/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.
Yongseok
---
>From 6db57d4b336ba6bbb55529ad87f93c0510536fd7 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 6fe6a22c4..50ade2002 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
@@ -318,6 +318,12 @@ efx_mcdi_read_sensors(
uint8_t payload[MAX(MC_CMD_READ_SENSORS_EXT_IN_LEN,
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;
req.emr_in_buf = payload;
@@ -335,6 +341,11 @@ efx_mcdi_read_sensors(
efx_mcdi_execute(enp, &req);
return (req.emr_rc);
+
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+ return (rc);
}
static __checkReturn efx_rc_t
--
2.11.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-29 15:01:46.086143930 -0800
+++ 0018-net-sfc-base-check-size-of-memory-to-read-sensors-da.patch 2018-11-29 15:01:44.999964000 -0800
@@ -1,12 +1,13 @@
-From 252faf84f41e6d726d3ab0f9b7544723756afcca Mon Sep 17 00:00:00 2001
+From 6db57d4b336ba6bbb55529ad87f93c0510536fd7 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 6fe6a22c4..50ade2002 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
-@@ -194,6 +194,12 @@ efx_mcdi_read_sensors(
+@@ -318,6 +318,12 @@ efx_mcdi_read_sensors(
uint8_t payload[MAX(MC_CMD_READ_SENSORS_EXT_IN_LEN,
MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
uint32_t addr_lo, addr_hi;
@@ -31,7 +32,7 @@
req.emr_cmd = MC_CMD_READ_SENSORS;
req.emr_in_buf = payload;
-@@ -211,6 +217,11 @@ efx_mcdi_read_sensors(
+@@ -335,6 +341,11 @@ efx_mcdi_read_sensors(
efx_mcdi_execute(enp, &req);
return (req.emr_rc);
More information about the stable
mailing list