Commit
307464a1 (ofproto-dpif-monitor: Use heap to order the mport
wakeup time.) re-heapifies the heap in monitor_run(). So the
monitor_run() should be protected by the write lock, rather than
the read lock.
This commit fixes the issue.
Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
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)