On Wed, 31 Oct 2007, Simon Horman wrote:
> For reference, I have attached my version of your two patches,
> which I have rediffed a little. Could you provide an appropriate
> comment and signoff for the second patch once you are happy with it?
The ip_vs_find_dest function is not safe. dest is valid only
while user holds reference to svc. That is how the locking works
currently, dest reference is hidden behind svc reference.
ip_vs_service_put must be called after ip_vs_conn_new. Another option
is ip_vs_find_dest to use ip_vs_dest_get, a new function that increments
dest->refcnt while we hold svc. In this case corresponding ip_vs_dest_put
is needed. It will just use atomic_dec(&dest->refcnt). My preference is
the first option.
Off-topic: is lvs-devel archive on web?
Julian Anastasov <ja at ssi.bg>