Messages in this thread | | | Date | Wed, 24 Mar 2004 05:38:33 +0100 | From | Andrea Arcangeli <> | Subject | Re: nonlinear swapping w/o pte_chains [Re: VMA_MERGING_FIXUP and patch] |
| |
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |