ofproto-dpif: Discard any flow_miss_batches before destroy a ofproto
authorAndy Zhou <azhou@nicira.com>
Fri, 28 Feb 2014 01:15:07 +0000 (17:15 -0800)
committerAndy Zhou <azhou@nicira.com>
Fri, 28 Feb 2014 20:42:58 +0000 (12:42 -0800)
commite8ac8c3940535fb439eba980afa6c61bdd428003
tree69bbc5c4d22a2f0a315bc94ceec6b2a2573e2eec
parent6795ba0edd02291c9a93186d8cca6017e63ba95f
ofproto-dpif: Discard any flow_miss_batches before destroy a ofproto

Commit dd2e44f835fac8 fixed a similar race conditions w.r.t.
removal of 'ofproto', but reintroduced this bug. While 'ofproto'
is being removed, the existing flow_miss_batches may still contain
references to the to be removed 'ofproto', causing access to freed
memory.

Bug #1202234

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif.c