All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: andros@netapp.com
Cc: bhalevy@panasas.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 0/5] pnfs-submit fix kfree under spin lock
Date: Tue, 20 Jul 2010 15:09:53 -0400	[thread overview]
Message-ID: <20100720190953.GA22237@infradead.org> (raw)
In-Reply-To: <1279645283-9862-1-git-send-email-andros@netapp.com>

On Tue, Jul 20, 2010 at 01:01:18PM -0400, andros@netapp.com wrote:
> 
> Fix kfree under spin lock
> 
> Both put_lseg and put_layout are called under the inode i_lock where the
> last reference will end up freeing structures.
> 
> I know there has been a lot of churn in this code, but free'ing under the
> spin lock is a no-no.

kfree under a spinlock is perfectly fine.  That is as long as you
don't free the spinlock itself.


  parent reply	other threads:[~2010-07-20 19:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 17:01 [PATCH 0/5] pnfs-submit fix kfree under spin lock andros
2010-07-20 17:01 ` [PATCH 1/5] SQUASHME pnfs-submit alloc layout don't call put_layout " andros
2010-07-20 17:01   ` [PATCH 2/5] SQUASHME pnfs-submit use atomic_dec_and_lock for layout refcounting andros
2010-07-20 17:01     ` [PATCH 3/5] SQUASHME pnfs-submit don't call put_lseg under spin lock andros
2010-07-20 17:01       ` [PATCH 4/5] SQUASHME pnfs-submit pnfs_release_layout just use inode andros
2010-07-20 17:01         ` [PATCH 5/5] SQUASHME pnfs-submit fix has_layout compile error andros
2010-07-22 16:26   ` [PATCH 1/5] SQUASHME pnfs-submit alloc layout don't call put_layout under spin lock Benny Halevy
2010-07-20 17:30 ` [PATCH 0/5] pnfs-submit fix kfree " William A. (Andy) Adamson
     [not found]   ` <AANLkTikzt-A69kM863U=YuGZ1-HGWr51KsJEts3uKFx6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-21  7:23     ` Benny Halevy
2010-07-21 14:46       ` William A. (Andy) Adamson
2010-07-20 19:09 ` Christoph Hellwig [this message]
2010-07-20 20:36   ` William A. (Andy) Adamson

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=20100720190953.GA22237@infradead.org \
    --to=hch@infradead.org \
    --cc=andros@netapp.com \
    --cc=bhalevy@panasas.com \
    --cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.