dpif-netdev: Move 'struct dp_netdev_port' initialization before use.
authorAlex Wang <alexw@nicira.com>
Sat, 8 Nov 2014 01:11:07 +0000 (17:11 -0800)
committerAlex Wang <alexw@nicira.com>
Wed, 12 Nov 2014 23:59:11 +0000 (15:59 -0800)
commitf7d636527b72231822ed3e25fe74edbc1a5ec41f
treee2727bb90a000e840b075b91e3b94cf2e7c4df24
parent886af6eaea556e53bf1d32025849202c3334f41f
dpif-netdev: Move 'struct dp_netdev_port' initialization before use.

There is a portion of the 'struct dp_netdev_port' initialization
that is placed after the reload of pmd threads.  This means in
theory, there could be a race where pmd threads access half-
initialized struct.  Although such race has not been seen, it
makes sense to fully initialize the struct before use.

Found by code inspection.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
lib/dpif-netdev.c