ofproto-dpif: Fix facet_lookup_valid().
authorEthan Jackson <ethan@nicira.com>
Wed, 29 May 2013 23:19:20 +0000 (16:19 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 30 May 2013 18:34:26 +0000 (11:34 -0700)
facet_lookup_valid() attempted to re-revalidate its facet after
it had been removed.  Added very recently in commit 5bf64ad
(ofproto-dpif: Avoid redundant facet_find() in
facet_lookup_valid()).

Found by inspection (by Justin).

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c

index 633dc5a..2fc00a7 100644 (file)
@@ -4882,10 +4882,7 @@ facet_lookup_valid(struct ofproto_dpif *ofproto, const struct flow *flow,
             || tag_set_intersects(&ofproto->backer->revalidate_set,
                                   facet->xout.tags))
         && !facet_revalidate(facet)) {
-        facet_revalidate(facet);
-
-        /* facet_revalidate() may have destroyed 'facet'. */
-        facet = facet_find(ofproto, flow, hash);
+        return NULL;
     }
 
     return facet;