[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070726200047.1225c084@localhost>
Date: Thu, 26 Jul 2007 20:00:47 +0200
From: Christian Krafft <krafft@...ibm.com>
To: Trond Myklebust <trond.myklebust@....uio.no>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: Re: [patch] nfs: fix locking in nfs/inode.c in
nfs_free_open_context
On Thu, 26 Jul 2007 12:08:17 -0400
Trond Myklebust <trond.myklebust@....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
Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists