ipvs: Fix race conditions in lblcr scheduler
authorSven Wegener <sven.wegener@stealer.net>
Tue, 19 Aug 2008 06:16:19 +0000 (08:16 +0200)
committerSimon Horman <horms@verge.net.au>
Tue, 19 Aug 2008 07:37:08 +0000 (17:37 +1000)
commitf728bafb5698076dd35bca35ee6cfe52ea1b8ab2
tree01908a5f303267248b12578c507c3bcd2946e628
parent39ac50d0c79747b186c1268d9a488f8c1d256be7
ipvs: Fix race conditions in lblcr scheduler

We can't access the cache entry outside of our critical read-locked region,
because someone may free that entry. Also getting an entry under read lock,
then locking for write and trying to delete that entry looks fishy, but should
be no problem here, because we're only comparing a pointer. Also there is no
need for our own rwlock, there is already one in the service structure for use
in the schedulers.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/ipv4/ipvs/ip_vs_lblcr.c