ipvs: only unlock in ip_vs_edit_service() if already locked
authorSimon Horman <horms@verge.net.au>
Wed, 17 Sep 2008 00:10:41 +0000 (10:10 +1000)
committerSimon Horman <horms@verge.net.au>
Wed, 17 Sep 2008 00:10:41 +0000 (10:10 +1000)
commit9e691ed68d94ab3047e028736641445b4cf74d67
tree165104bf7462da9e61263441458795da32b6c820
parente8ae43ec6d8fb28ceeb3eb2b9aa2de823666ba2b
ipvs: only unlock in ip_vs_edit_service() if already locked

Jumping to out unlocks __ip_vs_svc_lock, but that lock is not taken until
after code that may jump to out.

This problem was detected by sparse.

make C=1
  CHECK   net/ipv4/ipvs/ip_vs_ctl.c
net/ipv4/ipvs/ip_vs_ctl.c:1332:2: warning: context imbalance in 'ip_vs_edit_service' - unexpected unlock

Acked-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Julius Volz <juliusv@google.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/ipv4/ipvs/ip_vs_ctl.c