From: Daniel Phillips <news-innominate.list.linux.kernel@innominate.de>
To: Linus Torvalds <torvalds@transmeta.com>
To: linux-kernel@vger.kernel.org
Subject: Re: page->mapping == 0
Date: Mon, 30 Oct 2000 02:57:26 +0100 [thread overview]
Message-ID: <news2mail-39FCD586.E5F480A7@innominate.de> (raw)
In-Reply-To: <Pine.LNX.4.10.10010291100030.18939-100000@penguin.transmeta.com> <Pine.LNX.4.10.10010291118140.19109-100000@penguin.transmeta.com>
Linus Torvalds wrote:
> Now, I don't think this is really a valid usage pattern, so it's most
> likely to be a result of a buggy application, but I can imagine having
> some strange kind of user-space VM memory management scheme that depends
> on SIGBUS to maintain a file length. I've never heard of such a thing, but
> I could imagine somebody doing some kind of persistent data object store
> in user space this way.
>
> Does anybody actually know of an application that does something like
> this? Because I'm more and more inclined to just going with the half-fix
> for now. It would at least guarantee internal kernel data consistency (and
> no oopses, of course).
>
> Don't get me wrong - we need to clean this part up, but as far as I can
> tell we have never done this "right", so in that sense it's not a new
> 2.4.x bug and it can't break existing applications.
Strace shows that the history really is updated with no locking:
4030 open("/home/phillips/.bash_history", O_WRONLY|O_TRUNC) = 4
4030 write(4, "l\nless README\ne ../*test8/fs/ext"..., 7546) = 7546
4030 close(4) =
0
There's no reason to continue doing the read after you've detected the
page was pulled out from under you - clearly it's a user error state,
the only question is: return the error and break the buggy application?
Or gloss over it. And it seems like returning the error might actually
break bash - maybe it deserves it... but...
--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-10-30 1:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <14841.7644.853174.666385@argo.linuxcare.com.au>
[not found] ` <Pine.LNX.4.10.10010262325440.864-100000@penguin.transmeta.com>
2000-10-29 9:38 ` page->mapping == 0 Paul Mackerras
2000-10-29 12:39 ` Daniel Phillips
2000-10-29 18:05 ` Linus Torvalds
2000-10-29 18:32 ` Alexander Viro
2000-10-29 19:12 ` Linus Torvalds
2000-10-29 19:33 ` Linus Torvalds
2000-10-30 1:57 ` Daniel Phillips [this message]
2000-10-29 20:32 ` Alan Cox
2000-10-29 20:42 ` Alexander Viro
2000-10-29 22:26 ` Jeff V. Merkey
2000-10-29 23:12 ` Jeff Dike
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=news2mail-39FCD586.E5F480A7@innominate.de \
--to=news-innominate.list.linux.kernel@innominate.de \
--cc=phillips@innominate.de \
--cc=torvalds@transmeta.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