From: Ben Pfaff Date: Wed, 4 Mar 2009 22:55:20 +0000 (-0800) Subject: secchan: Fix segfault when subrules are invalidated. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6e60c552d66042bfb3ac200730f92d5be67f767;p=openvswitch secchan: Fix segfault when subrules are invalidated. The subrules were being freed, but not removed from the classifier, so a segfault would occur later when they were accessed during a lookup or traversal. Thanks to Dan and Natasha for the report and testcases. --- diff --git a/secchan/ofproto.c b/secchan/ofproto.c index 6b03b1dd..1a3b4e8c 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -2298,6 +2298,7 @@ revalidate_subrule(struct ofproto *p, struct rule *sub) struct odp_flow odp_flow; odp_flow.key = sub->cr.flow; dpif_flow_del(&p->dpif, &odp_flow); + classifier_remove(&p->cls, &sub->cr); rule_destroy(sub); return false; } else {