Commit 307464a1 (ofproto-dpif-monitor: Use heap to order the mport wakeup time.) re-heapifies the heap in monitor_run(). So monitor_run() should be protected by the write lock, rather than the read lock.
This commit fixes the issue. Signed-off-by: Alex Wang <al...@nicira.com> --- v1 -> v2: - rebase master. --- ofproto/ofproto-dpif-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif-monitor.c b/ofproto/ofproto-dpif-monitor.c index 2a833bb..af66387 100644 --- a/ofproto/ofproto-dpif-monitor.c +++ b/ofproto/ofproto-dpif-monitor.c @@ -197,7 +197,7 @@ monitor_run(void) struct ofpbuf packet; ofpbuf_use_stub(&packet, stub, sizeof stub); - ovs_rwlock_rdlock(&monitor_rwlock); + ovs_rwlock_wrlock(&monitor_rwlock); prio_now = MSEC_TO_PRIO(time_msec()); /* Peeks the top of heap and checks if we should run this mport. */ while (!heap_is_empty(&monitor_heap) -- 1.7.9.5 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev