datapath: Don't directly access port array in query_port().
authorJesse Gross <jesse@nicira.com>
Fri, 24 Dec 2010 01:56:29 +0000 (17:56 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 29 Dec 2010 18:30:09 +0000 (10:30 -0800)
commit7e71ab66e9a164359c0a5f1d6a20bb2efc15500f
tree5b7f6abbe406c8f9f747a02ef8c443db9d183bde
parent1452b28ca636521b6e16f76787524f83205ec7a3
datapath: Don't directly access port array in query_port().

query_port() directly accesses the datapath port array, without
using any kind of RCU dereference.  It's OK, since it is holding
DP mutex but this adds an explicit check to make sparse happy.
It also simplifies the code path somewhat.

Found with sparse.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c