LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] ipvs: Fix race conditions in lblc scheduler

To: Sven Wegener <sven.wegener@xxxxxxxxxxx>
Subject: Re: [PATCH] ipvs: Fix race conditions in lblc scheduler
Cc: netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, wensong@xxxxxxxxxxxx, ja@xxxxxx
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 19 Aug 2008 09:19:49 +1000
On Mon, Aug 18, 2008 at 12:52:08AM +0200, Sven Wegener wrote:
> We can't access the cache entry outside of our critical read-locked region,
> because someone may free that entry. And we also need to check in the critical
> region wether the destination is still available, i.e. it's not in the trash.
> If we drop our reference counter, the destination can be purged from the trash
> at any time. Our caller only guarantees that no destination is moved to the
> trash, while we are scheduling. Also there is no need for our own rwlock,
> there is already one in the service structure for use in the schedulers.

Hi Sven,

this looks good to me. I have confirmed that it applies against lvs-2.6
(but not net-2.6 as changes that are already in lvs-2.6 are needed).

One minor style question.  You have changed struct ip_vs_lblc_table to *tbl
in several places, (e.g. sizeof(*tbl) ). I think that I prefer things the
way that they were. Was there a reason for this change?
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>