From: Andrea Arcangeli <andrea@suse.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: nonlinear swapping w/o pte_chains [Re: VMA_MERGING_FIXUP and patch]
Date: Wed, 24 Mar 2004 05:38:33 +0100 [thread overview]
Message-ID: <20040324043833.GC2278@dualathlon.random> (raw)
In-Reply-To: <20040323214459.GG3682@dualathlon.random>
On Tue, Mar 23, 2004 at 10:44:59PM +0100, Andrea Arcangeli wrote:
> +#ifdef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
> + get_page(page);
> +#endif
> + unmap_pte_page(page, vma, address, ptep);
^^^^^^^ + offset
I added some stuff in the shm threaded test program to verify
correctness after swapin and it showed userspace mm corruption on the
nonlinear pages, the above + offset is the fix.
I also merged anobjrmap-6 from Hugh so ppc and ppc64 compiles fine (plus
some other arch).
Also the race in do_anonymous_page couldn't trigger, the callers of
try_to_unmap always first check if the page is mapped after taking the
page_map_lock, so I'm backing it out.
The real race triggering such bug is that I'm not taking the
page_map_lock for all the pages before unmapping them so the
--page->mapcount aren't atomic while the page is unmapped by different
address spaces at the same time from multiple cpus.
It'll all be fixed in the next update.
next prev parent reply other threads:[~2004-03-24 4:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 17:05 VMA_MERGING_FIXUP and patch Hugh Dickins
2004-03-22 17:52 ` Andrea Arcangeli
2004-03-22 19:02 ` Hugh Dickins
2004-03-22 19:58 ` Andrea Arcangeli
2004-03-23 21:44 ` nonlinear swapping w/o pte_chains [Re: VMA_MERGING_FIXUP and patch] Andrea Arcangeli
2004-03-24 2:35 ` Andrea Arcangeli
2004-03-24 4:38 ` Andrea Arcangeli [this message]
2004-03-24 10:12 ` Hugh Dickins
2004-03-24 12:18 ` Hugh Dickins
2004-03-24 14:47 ` Andrea Arcangeli
2004-03-24 14:37 ` Andrea Arcangeli
2004-03-24 18:42 ` Andrea Arcangeli
2004-03-22 19:57 ` VMA_MERGING_FIXUP and patch Andrew Morton
2004-03-22 20:05 ` Andrea Arcangeli
2004-03-22 20:33 ` Andrew Morton
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=20040324043833.GC2278@dualathlon.random \
--to=andrea@suse.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--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