ipvs: fix sparse warnings for ip_vs_conn listing
authorJulian Anastasov <ja@ssi.bg>
Wed, 17 Apr 2013 20:50:46 +0000 (23:50 +0300)
committerSimon Horman <horms@verge.net.au>
Tue, 23 Apr 2013 02:43:05 +0000 (11:43 +0900)
commit7cf2eb7bccbe0d7a8ab1d1382c4faa2b3abf817f
tree3dfaa48d6e8e2d6de2a0b254714bc9278bc6a483
parentd717bb2a9815f21ad962574daff821379f485ee3
ipvs: fix sparse warnings for ip_vs_conn listing

kbuild test robot reports for sparse warnings
in commit 088339a57d6042 ("ipvs: convert connection locking"):

net/netfilter/ipvs/ip_vs_conn.c:962:13: warning: context imbalance
in 'ip_vs_conn_array' - wrong count at exit
include/linux/rcupdate.h:326:30: warning: context imbalance in
'ip_vs_conn_seq_next' - unexpected unlock
include/linux/rcupdate.h:326:30: warning: context imbalance in
'ip_vs_conn_seq_stop' - unexpected unlock

Fix it by running ip_vs_conn_array under RCU lock
to avoid conditional locking and by adding proper RCU
annotations.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_conn.c