Skip to content

Commit

Permalink
revalidator: Fix access of uninitialized memory.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
joestringer committed Dec 9, 2014
1 parent 66e1d95 commit 4c438b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,7 @@ revalidate_ukey(struct udpif *udpif, struct udpif_key *ukey,
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;
Expand Down

0 comments on commit 4c438b6

Please sign in to comment.