|
Message-ID: <CAEXv5_ifq6gO1eBueYGCL21QBAsCQNZROxGCuEYWSNmXz7OTeQ@mail.gmail.com> Date: Tue, 14 Feb 2017 08:48:26 -0500 From: David Windsor <dwindsor@...il.com> To: Christoph Hellwig <hch@...radead.org> Cc: Jeff Layton <jlayton@...chiereds.net>, linux-nfs@...r.kernel.org, netdev@...r.kernel.org, kernel-hardening@...ts.openwall.com, Bruce Fields <bfields@...ldses.org>, Kees Cook <keescook@...omium.org>, "Reshetova, Elena" <elena.reshetova@...el.com> Subject: Re: [RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session On Mon, Feb 13, 2017 at 7:12 AM, Christoph Hellwig <hch@...radead.org> wrote: > On Mon, Feb 13, 2017 at 06:42:56AM -0500, David Windsor wrote: >> I'm not sure this is a sound argument for not converting to >> refcount_t. > > It's an argument again the way how this patch was sent. Please take care > of all the trivial conversions first, and then do anything non-trivial > on a case by case basis. This is actually what we're currently doing. The vast majority of atomic_t to refcount_t conversions are trivial, as they most always follow the pattern: 1. Initialize the atomic_t refcounter to 1. 2. Perform shared object get/put operations. 3. Free the shared object when its refcount becomes 0. We've identified a handful of instances in which steps 1 and 3 are different from above (i.e. initializing refcounts to 0, freeing objects when refcount is non-zero, etc.). The above patch addresses one of these instances in NFS. Thanks, David
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.