From: "Stephen C. Tweedie" <sct@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-mm@kvack.org, "David S. Miller" <davem@redhat.com>,
Alan Cox <alan@redhat.com>, Rik van Riel <riel@conectiva.com.br>
Subject: Re: Call me crazy..
Date: Mon, 8 Jan 2001 14:18:23 +0000 [thread overview]
Message-ID: <20010108141823.S9321@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10101072242340.29065-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Sun, Jan 07, 2001 at 10:51:04PM -0800
Hi,
On Sun, Jan 07, 2001 at 10:51:04PM -0800, Linus Torvalds wrote:
> ..but there seems to be a huge gaping hole in copy_page_range().
>
> It's called during fork(), and as far as I can tell it doesn't get the
> page table lock at all when it copies the page table from the parent to
> the child.
>
> Now, just for fun, explain to me why some other process couldn't race with
> copy_page_range() on another CPU, and decimate the parents page tables,
> resulting in the child getting a page table entry that isn't valid any
> more?
It looks like it is needed. It's even worse on PAE36, where we are
doing things like
if (!pte_present(pte)) {
swap_duplicate(pte_to_swp_entry(pte));
goto cont_copy_pte_range;
}
without the lock: other CPUs may be doing non-atomic operations such
as ptep_get_and_clear() which leave a !pte_present() pte with invalid
contents for a brief period.
--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
prev parent reply other threads:[~2001-01-08 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-08 6:51 Linus Torvalds
2001-01-08 6:37 ` David S. Miller
2001-01-08 14:18 ` Stephen C. Tweedie [this message]
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=20010108141823.S9321@redhat.com \
--to=sct@redhat.com \
--cc=alan@redhat.com \
--cc=davem@redhat.com \
--cc=linux-mm@kvack.org \
--cc=riel@conectiva.com.br \
--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