From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Nick Piggin <npiggin@suse.de>
Subject: [PATCH 000 of 2] Fix some bugs with 'read' racing with 'truncate'
Date: Thu, 7 Jun 2007 11:46:47 +1000 [thread overview]
Message-ID: <20070607114043.26967.patches@notabene> (raw)
The following two patches fix a couple of bugs which trigger when read
races with truncate.
As there is no locking between read and truncate, we need to be
careful about sequencing. In some cases were aren't careful enough.
The first patch ensures that we check i_size *after* gaining a
reference to an uptodate page, thus ensuring that we don't unknowingly
returns NUL characters that are beyond the end of the file.
The second ensures that we don't deliver partial reads to more than
one sub-buffer in a readv call.
These bugs have been around for a while and are quite subtle, so I
don't think there is any rush for them to go into 2.6.22. Rather they
should sit in -mm at least until .23 opens up.
Thanks,
NeilBrown
[PATCH 001 of 2] Fix read/truncate race.
[PATCH 002 of 2] Make sure readv stops reading when it hits end-of-file.
next reply other threads:[~2007-06-07 1:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 1:46 NeilBrown [this message]
2007-06-07 1:46 ` [PATCH 001 of 2] Fix read/truncate race NeilBrown
2007-06-07 7:19 ` Jens Axboe
2007-06-08 1:18 ` Andrew Morton
2007-06-08 2:48 ` Neil Brown
2007-06-08 6:10 ` Andrew Morton
2007-06-12 0:16 ` Neil Brown
2007-06-12 0:35 ` Andrew Morton
2007-06-07 1:47 ` [PATCH 002 of 2] Make sure readv stops reading when it hits end-of-file NeilBrown
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=20070607114043.26967.patches@notabene \
--to=neilb@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®