From: Al Viro <viro@ZenIV.linux.org.uk>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Bryan Wu <cooloney@kernel.org>,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
willy@debian.org, uclinux-dist-devel@blackfin.uclinux.org,
richterd@citi.umich.edu
Subject: Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs
Date: Thu, 1 May 2008 07:24:32 +0100 [thread overview]
Message-ID: <20080501062432.GT5882@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080429214231.GC26468@fieldses.org>
On Tue, Apr 29, 2008 at 05:42:31PM -0400, J. Bruce Fields wrote:
> The most likely consequences are that a local reader gets out-of-date
> data for a file that a Samba client has modified.
>
> I suppose that re-checking the d_count and i_count after step 3 might
> close the race.
The hell it might. Leases are broken, plain and simple. Not to mention
anything else, a couple of threads with shared descriptor table will
bypass these checks happily.
FWIW, that's far from the worst problem in fs/locks.c, and not even the
worst one with leases.
That, BTW, is a fine demonstration of the reasons why application-specific
kernel warts(tm) are bad. Lease support is samba-only turd; so's dnotify,
with its lovely problems. And interfaces like that *suck*; they are
developed with one application in mind and that leads to "we know how it
will be used" mentality. With obvious implications for quality of review
they get from their developers...
Al, currently crawling through struct file_lock review and extremely annoyed
by the amount of turds being found...
next prev parent reply other threads:[~2008-05-01 6:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 3:42 [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs Bryan Wu
2008-04-29 20:54 ` Andrew Morton
2008-04-29 21:42 ` J. Bruce Fields
2008-04-29 22:01 ` Mike Frysinger
2008-04-29 22:11 ` J. Bruce Fields
2008-04-29 22:15 ` Mike Frysinger
2008-04-29 23:21 ` david m. richter
2008-04-30 17:50 ` J. Bruce Fields
2008-04-30 18:14 ` david m. richter
2008-05-01 6:24 ` Al Viro [this message]
2008-05-02 22:22 ` J. Bruce Fields
2008-04-29 22:21 ` Matthew Wilcox
2008-05-01 6:33 ` Al Viro
2008-05-02 22:26 ` J. Bruce Fields
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=20080501062432.GT5882@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=cooloney@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=richterd@citi.umich.edu \
--cc=torvalds@linux-foundation.org \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=willy@debian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox