ofproto-dpif: Disable miss handling in rule_get_stats().
authorEthan Jackson <ethan@nicira.com>
Sat, 6 Apr 2013 22:22:14 +0000 (15:22 -0700)
committerEthan Jackson <ethan@nicira.com>
Sun, 7 Apr 2013 01:26:19 +0000 (18:26 -0700)
commit8fb7eddbcd1a487a883d6c3d96525a944b5a43f0
treeee2f10507ae3eff80278085523a79b85a08fe8e6
parente7169719c9a6923654e098f72510fd54d249dcf2
ofproto-dpif: Disable miss handling in rule_get_stats().

rule_get_stats() is often called when iterating over every rule in
the flow table.  To ensure up-to-date statistics, rule_get_stats()
calls push_all_stats() which can cause flow misses to be handled.
When using the learn action, this can cause rules to be added (and
potentially removed) from the OpenFlow table.  This could corrupt
the caller's data structures, leading to a segmentation fault.
This patch fixes the issue by disabling flow miss handling from
within rule_get_stats().

Bug #15999.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif.c