From 4c438b67ee1b62afe5492c469769eb00f5b958e8 Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Mon, 8 Dec 2014 17:14:39 -0800 Subject: [PATCH] revalidator: Fix access of uninitialized memory. Commit 64bb477 "dpif: Minimize memory copy for revalidation." introduced a bug where the corner case of ukey creation (in revalidator threads) could result in access to uninitialized memory when deleting flows from the datapath. This could result in OVS aborting or deadlock. Fix it. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- ofproto/ofproto-dpif-upcall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 38e1affdc..5fe90ac0a 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -1675,6 +1675,7 @@ exit: static void delete_op_init__(struct ukey_op *op, const struct dpif_flow *flow) { + op->ukey = NULL; op->dop.type = DPIF_OP_FLOW_DEL; op->dop.u.flow_del.key = flow->key; op->dop.u.flow_del.key_len = flow->key_len; -- 2.20.1