netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Simon Horman <horms@verge.net.au>
Cc: Julian Anastasov <ja@ssi.bg>, David Windsor <dwindsor@gmail.com>,
	netdev@vger.kernel.org, kernel-hardening@lists.openwall.com,
	netfilter-devel@vger.kernel.org, lvs-devel@vger.kernel.org,
	wensong@linux-vs.org, keescook@chromium.org,
	elena.reshetova@intel.com, ishkamiel@gmail.com
Subject: Re: [PATCH v2 net] net: free ip_vs_dest structs when refcnt=0
Date: Fri, 27 Jan 2017 13:21:11 +0100	[thread overview]
Message-ID: <20170127122111.GA2495@salvia> (raw)
In-Reply-To: <20170127080738.GD21195@verge.net.au>

On Fri, Jan 27, 2017 at 09:07:38AM +0100, Simon Horman wrote:
> On Thu, Jan 26, 2017 at 10:49:10PM +0200, Julian Anastasov wrote:
> > 
> > 	Hello,
> > 
> > On Mon, 23 Jan 2017, David Windsor wrote:
> > 
> > > 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: David Windsor <dwindsor@gmail.com>
> > 
> > 	Thanks! I tested the first version and this one
> > just adds the needed changes in comments, so
> > 
> > Signed-off-by: Julian Anastasov <ja@ssi.bg>
> > 
> > 	Simon and Pablo, this is more appropriate for
> > ipvs-next/nf-next. Please apply!
> 
> Pablo, would you mind taking this one directly into nf-next?
> 
> Signed-off-by: Simon Horman <horms@verge.net.au>

Sure, no problem. I'll take it. Thanks!

  reply	other threads:[~2017-01-27 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24  3:24 [PATCH v2 net] net: free ip_vs_dest structs when refcnt=0 David Windsor
2017-01-26 20:49 ` Julian Anastasov
2017-01-27  8:07   ` Simon Horman
2017-01-27 12:21     ` Pablo Neira Ayuso [this message]
2017-01-27 18:37       ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170127122111.GA2495@salvia \
    --to=pablo@netfilter.org \
    --cc=dwindsor@gmail.com \
    --cc=elena.reshetova@intel.com \
    --cc=horms@verge.net.au \
    --cc=ishkamiel@gmail.com \
    --cc=ja@ssi.bg \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=wensong@linux-vs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).