[ovs-dev] [PATCH] ofproto-dpif-xlate: Fix segmentation fault caused by tun_table

Yi-Hung Wei yihung.wei at gmail.com
Wed May 2 00:20:31 UTC 2018


Currently, the revalidator thread may hit segmentation fault when geneve
TLV map is updated.  It is because we may store the old TLV map (struct
tun_table) in the frozen state for recirculation, and we may access the
already freed old tun_table in xlate_actions().

This patch update the logic of getting tun_table so that we will use
the latest tun_table instead of the frozen one.

VMWare-BZ: #2106987
Signed-off-by: Yi-Hung Wei <yihung.wei at gmail.com>
---
 ofproto/ofproto-dpif-xlate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 94e3ddb1376f..c73aebb494ae 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -7138,7 +7138,7 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
             ctx.error = XLATE_INVALID_TUNNEL_METADATA;
             goto exit;
         }
-    } else if (!flow->tunnel.metadata.tab) {
+    } else if (!flow->tunnel.metadata.tab || xin->frozen_state) {
         /* If the original flow did not come in on a tunnel, then it won't have
          * FLOW_TNL_F_UDPIF set. However, we still need to have a metadata
          * table in case we generate tunnel actions. */
-- 
2.7.4



More information about the dev mailing list