• David Windsor's avatar
    ipvs: free ip_vs_dest structs when refcnt=0 · 90c1aff7
    David Windsor authored
    Currently, the ip_vs_dest cache frees ip_vs_dest objects when their
    reference count becomes < 0.  Aside from not being semantically sound,
    this is problematic for the new type refcount_t, which will be introduced
    shortly in a separate patch. refcount_t is the new kernel type for
    holding reference counts, and provides overflow protection and a
    constrained interface relative to atomic_t (the type currently being
    used for kernel reference counts).
    
    Per Julian Anastasov: "The problem is that dest_trash currently holds
    deleted dests (unlinked from RCU lists) with refcnt=0."  Changing
    dest_trash to hold dest with refcnt=1 will allow us to free ip_vs_dest
    structs when their refcnt=0, in ip_vs_dest_put_and_free().
    Signed-off-by: default avatarDavid Windsor <dwindsor@gmail.com>
    Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
    Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    90c1aff7
ip_vs.h 46.8 KB