From: Anton Altaparmakov <aia21@cam.ac.uk>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Andrea Arcangeli <andrea@suse.de>
Subject: Re: [patch] fix race in __block_prepare_write (again)
Date: Fri, 22 Apr 2005 16:50:06 +0100 [thread overview]
Message-ID: <1114185006.4092.4.camel@imp.csi.cam.ac.uk> (raw)
In-Reply-To: <17001.5070.79877.986252@gargle.gargle.HOWL>
On Fri, 2005-04-22 at 19:10 +0400, Nikita Danilov wrote:
> Anton Altaparmakov writes:
> > mm/filemap.c::file_buffered_write():
> >
> > - It calls fault_in_pages_readable() which is completely bogus if
> > @nr_segs > 1. It needs to be replaced by a to be written
> > "fault_in_pages_readable_iovec()".
>
> Which will be only marginally less bogus, because page(s) can be evicted
> from the memory between fault_in_pages_readable*() and
> __grab_cache_page() anyway.
That is true. But it does make the race condition smaller.
A better approach would be to lock the pages into memory via set page
reserved or something. Of course they will need unmarking straight
after and we would need to be careful to not unmark pages that were
marked reserved to start with.
Comments?
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
next prev parent reply other threads:[~2005-04-22 15:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 6:14 Nick Piggin
2005-04-21 7:01 ` Anton Altaparmakov
2005-04-21 7:10 ` Anton Altaparmakov
2005-04-21 7:20 ` Nick Piggin
2005-04-21 7:31 ` Anton Altaparmakov
2005-04-22 15:10 ` Nikita Danilov
2005-04-22 15:50 ` Anton Altaparmakov [this message]
2005-04-24 21:24 ` Andrew Morton
2005-04-25 7:44 ` Anton Altaparmakov
2005-04-21 7:13 ` Nick Piggin
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=1114185006.4092.4.camel@imp.csi.cam.ac.uk \
--to=aia21@cam.ac.uk \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita@clusterfs.com \
/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®