ofproto-dpif: Close race between processing packet_ins and checking seqno.
authorBen Pfaff <blp@nicira.com>
Wed, 30 Apr 2014 18:07:46 +0000 (11:07 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 30 Apr 2014 19:47:32 +0000 (12:47 -0700)
commit64fbbf0deec3b4579b7cb1d0e26558ff5e03b5c2
tree3800e9a1591aa21d842b2070cb4d919c87fca170
parentd476681e590bb9dd87bc8bf9556bc93d9c204b15
ofproto-dpif: Close race between processing packet_ins and checking seqno.

If a packet-in were to be queued, and the sequence number changed, after
grabbing the list of packet-ins, then the existing code could have gone to
sleep until something happened.  By grabbing the sequence number before
the list of packet-ins, we avoid this race.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c