From: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] fs: remove local variable copy of f_pos to enable thread-safe updates
Date: Fri, 2 May 2008 08:33:50 -0700 (PDT) [thread overview]
Message-ID: <342069.46185.qm@web52010.mail.re2.yahoo.com> (raw)
----- Original Message ----
> From: Al Viro <viro@ZenIV.linux.org.uk>
> To: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org
> Sent: Friday, May 2, 2008 12:33:02 PM
> Subject: Re: [patch] fs: remove local variable copy of f_pos to enable thread-safe updates
>
> On Fri, May 02, 2008 at 02:14:25AM -0700, Matti Linnanvuori wrote:
> > From: Matti Linnanvuori
> >
> > Remove local variable copy of f_pos to enable thread-safe updates in
> > implementation functions of system calls read, readv, write and writev.
>
> ... and we are back to square one with racy instances of ->read() that
> will use *pos twice, leaving a window for e.g. lseek() to invalidate
> e.g. wraparound tests. Not that deciding what to do at the end of
> e.g. read() with lseek() happening in the middle would be fun anyway -
> esp. since you don't remember the kind of seek it had been.
File systems can be written so that implementations of read, lseek etc.
acquire a lock before using *pos, which precludes races. That was the
idea behind my patch. So, my patch does not necessarily cause races.
read instances can be racy in Linux now because there is no lock to
serialize read etc. system calls.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
next reply other threads:[~2008-05-02 15:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 15:33 Matti Linnanvuori [this message]
2008-05-02 15:41 ` Al Viro
-- strict thread matches above, loose matches on Subject: below --
2008-05-02 9:14 Matti Linnanvuori
2008-05-02 9:33 ` Al Viro
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=342069.46185.qm@web52010.mail.re2.yahoo.com \
--to=mattilinnanvuori@yahoo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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
all inboxes | Powered by JetHome®