|
|
a6baaf |
From 04c233dd15e3b5bc842af371c3433eb723ffb6e6 Mon Sep 17 00:00:00 2001
|
|
|
a6baaf |
From: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Date: Tue, 23 Mar 2021 22:11:13 -0400
|
|
|
a6baaf |
Subject: [PATCH 1/8] net: remove an assert call in eth_get_gso_type
|
|
|
a6baaf |
MIME-Version: 1.0
|
|
|
a6baaf |
Content-Type: text/plain; charset=UTF-8
|
|
|
a6baaf |
Content-Transfer-Encoding: 8bit
|
|
|
a6baaf |
|
|
|
a6baaf |
RH-Author: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Message-id: <20210323221113.1893864-2-jmaloy@redhat.com>
|
|
|
a6baaf |
Patchwork-id: 101364
|
|
|
a6baaf |
O-Subject: [RHEL-8.4.0 qemu-kvm PATCH 1/1] net: remove an assert call in eth_get_gso_type
|
|
|
a6baaf |
Bugzilla: 1939494
|
|
|
a6baaf |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
a6baaf |
RH-Acked-by: Xiao Wang <jasowang@redhat.com>
|
|
|
a6baaf |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
a6baaf |
|
|
|
a6baaf |
From: Prasad J Pandit <pjp@fedoraproject.org>
|
|
|
a6baaf |
|
|
|
a6baaf |
eth_get_gso_type() routine returns segmentation offload type based on
|
|
|
a6baaf |
L3 protocol type. It calls g_assert_not_reached if L3 protocol is
|
|
|
a6baaf |
unknown, making the following return statement unreachable. Remove the
|
|
|
a6baaf |
g_assert call, it maybe triggered by a guest user.
|
|
|
a6baaf |
|
|
|
a6baaf |
Reported-by: Gaoning Pan <pgn@zju.edu.cn>
|
|
|
a6baaf |
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
|
|
|
a6baaf |
Signed-off-by: Jason Wang <jasowang@redhat.com>
|
|
|
a6baaf |
|
|
|
a6baaf |
(cherry picked from commit 7564bf7701f00214cdc8a678a9f7df765244def1)
|
|
|
a6baaf |
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
|
|
a6baaf |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
a6baaf |
---
|
|
|
a6baaf |
net/eth.c | 6 +++---
|
|
|
a6baaf |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
a6baaf |
|
|
|
a6baaf |
diff --git a/net/eth.c b/net/eth.c
|
|
|
a6baaf |
index 0c1d413ee2..1e0821c5f8 100644
|
|
|
a6baaf |
--- a/net/eth.c
|
|
|
a6baaf |
+++ b/net/eth.c
|
|
|
a6baaf |
@@ -16,6 +16,7 @@
|
|
|
a6baaf |
*/
|
|
|
a6baaf |
|
|
|
a6baaf |
#include "qemu/osdep.h"
|
|
|
a6baaf |
+#include "qemu/log.h"
|
|
|
a6baaf |
#include "net/eth.h"
|
|
|
a6baaf |
#include "net/checksum.h"
|
|
|
a6baaf |
#include "net/tap.h"
|
|
|
a6baaf |
@@ -71,9 +72,8 @@ eth_get_gso_type(uint16_t l3_proto, uint8_t *l3_hdr, uint8_t l4proto)
|
|
|
a6baaf |
return VIRTIO_NET_HDR_GSO_TCPV6 | ecn_state;
|
|
|
a6baaf |
}
|
|
|
a6baaf |
}
|
|
|
a6baaf |
-
|
|
|
a6baaf |
- /* Unsupported offload */
|
|
|
a6baaf |
- g_assert_not_reached();
|
|
|
a6baaf |
+ qemu_log_mask(LOG_UNIMP, "%s: probably not GSO frame, "
|
|
|
a6baaf |
+ "unknown L3 protocol: 0x%04"PRIx16"\n", __func__, l3_proto);
|
|
|
a6baaf |
|
|
|
a6baaf |
return VIRTIO_NET_HDR_GSO_NONE | ecn_state;
|
|
|
a6baaf |
}
|
|
|
a6baaf |
--
|
|
|
a6baaf |
2.27.0
|
|
|
a6baaf |
|