From: YAMAMOTO Takashi Date: Fri, 18 Apr 2014 02:13:01 +0000 (+0900) Subject: ofproto-dpif-upcall: Don't use stack garbage X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~110 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=6a279b0738fe7e2603a77cf56139f9b06b853e5b ofproto-dpif-upcall: Don't use stack garbage Catched by "learning action - self-modifying flow with hard_timeout" test case. The bug introduced by commit b256dc52. ("ofproto-dpif-xlate: Cache xlate_actions() effects.") Acked-by: Jarno Rajahalme Signed-off-by: YAMAMOTO Takashi --- diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 000f5c074..4ee5bf59c 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -1255,7 +1255,6 @@ revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump, xoutp = NULL; actions = NULL; netflow = NULL; - may_learn = push.n_packets > 0; /* If we don't need to revalidate, we can simply push the stats contained * in the udump, otherwise we'll have to get the actions so we can check @@ -1289,6 +1288,7 @@ revalidate_ukey(struct udpif *udpif, struct udpif_flow_dump *udump, goto exit; } + may_learn = push.n_packets > 0; if (ukey->xcache && !udump->need_revalidate) { xlate_push_stats(ukey->xcache, may_learn, &push); ok = true;