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:22:33 +0000 (18:22 -0700)
commit4464589ee774fe4e12777e757469817744f74a93
tree65278af6009ce0c4261d95cf3a9b9fefe55ee35b
parentca03aae04af733a32b8dcfd95f38d301ecc80277
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