public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Krafft <krafft@de.ibm.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [patch] nfs: fix locking in nfs/inode.c in nfs_free_open_context
Date: Thu, 26 Jul 2007 20:00:47 +0200	[thread overview]
Message-ID: <20070726200047.1225c084@localhost> (raw)
In-Reply-To: <1185466097.6585.186.camel@localhost>

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

On Thu, 26 Jul 2007 12:08:17 -0400
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> On Thu, 2007-07-26 at 17:13 +0200, Arnd Bergmann wrote:
> > Unfortunately, you didn't answer my question. The observed problem is
> > that the final kref_put gets called at a time where there are still
> > references to the context in nfsi->open_files, and other threads
> > therefore do get at them.
> 
> Actually, I thought I did: I said we need to grab the lock atomically
> with the last put. See below.
> 
> > The patch holds the i_lock around the kref_put to prevent others
> > from searching the list. Ugly, I know, but it seems that's the
> > price you pay for using a kref in such unconventional ways, i.e.
> > not counting every reference.
> 
> Really ugly. Here's an alternative that is a lot more palatable.

Indeed, and it also compiles ;-)
I started a test run using this patch, we'll see in a few hours ...

-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-07-26 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 15:08 [patch] nfs: fix locking in nfs/inode.c in nfs_free_open_context Christian Krafft
2007-07-25 17:28 ` Trond Myklebust
2007-07-26 11:23   ` Arnd Bergmann
2007-07-26 12:37     ` Trond Myklebust
2007-07-26 12:44     ` Christian Krafft
2007-07-26 13:23       ` Trond Myklebust
2007-07-26 15:13         ` Arnd Bergmann
2007-07-26 16:08           ` Trond Myklebust
2007-07-26 18:00             ` Christian Krafft [this message]
2007-07-27 10:02               ` Christian Krafft
2007-07-27  9:44             ` Arnd Bergmann

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=20070726200047.1225c084@localhost \
    --to=krafft@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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