[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070912190653.GA13792@fieldses.org>
Date: Wed, 12 Sep 2007 15:06:53 -0400
From: "J. Bruce Fields" <bfields@...ldses.org>
To: Pavel Emelyanov <xemul@...nvz.org>
Cc: Trond Myklebust <trond.myklebust@....uio.no>,
Andrew Morton <akpm@...l.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devel@...nvz.org
Subject: Re: [PATCH] Memory shortage can result in inconsistent flocks state
On Tue, Sep 11, 2007 at 04:38:13PM +0400, Pavel Emelyanov wrote:
> This is a known feature that such "re-locking" is not atomic,
> but in the racy case the file should stay locked (although by
> some other process), but in this case the file will be unlocked.
That's a little subtle (I assume you've never seen this actually
happen?), but it makes sense to me.
> The proposal is to prepare the lock in advance keeping no chance
> to fail in the future code.
And the patch certainly looks correct.
I can add it to my (trivial) lock patches, if that's helpful--it'll
get folded into the branch -mm pulls from and I can pass it along to
Linus for 2.6.24.
What I don't have that I wish I did is good regression tests for the
flock or lease code (for posix locks I've been using connectathon,
though that misses some important things too).
--b.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists