[dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' has been queued to LTS release 18.11.11
Kevin Traynor
ktraynor at redhat.com
Wed Nov 18 17:34:48 CET 2020
Hi,
FYI, your patch has been queued to LTS release 18.11.11
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/24/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.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2acc31435034fb83e02a99109ed367857ca5aff1
Thanks.
Kevin.
---
>From 2acc31435034fb83e02a99109ed367857ca5aff1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Tue, 8 Sep 2020 11:06:42 +0100
Subject: [PATCH] net/netvsc: replace compiler builtin overflow check
'__builtin_add_overflow' added to gcc in version 5, earlier versions
causing build error, like gcc 4.8.5 in RHEL7.
Replaced compiler builtin check with arithmetic check.
Fixes: 7838d3a6ae7a ("net/netvsc: check for overflow on packet info from host")
Reported-by: Raslan Darawsheh <rasland at mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
Tested-by: Raslan Darawsheh <rasland at nvidia.com>
Tested-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
(cherry picked from commit d73543b5f46db489c7b6fd2dfc8f905ec7304310)
---
drivers/net/netvsc/hn_rxtx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index fba08b166b..a70bac53d3 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -621,5 +621,5 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
void *data, uint32_t dlen)
{
- unsigned int data_off, data_len, total_len;
+ unsigned int data_off, data_len;
unsigned int pktinfo_off, pktinfo_len;
const struct rndis_packet_msg *pkt = data;
@@ -667,6 +667,6 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
}
- if (__builtin_add_overflow(data_off, data_len, &total_len) ||
- total_len > pkt->len)
+ /* overflow check */
+ if (data_len > data_len + data_off || data_len + data_off > pkt->len)
goto error;
--
2.26.2
More information about the stable
mailing list