Re: [PATCH 2/2] Futex non-page-pinning fix

From: Hugh Dickins
Date: Wed Aug 27 2003 - 05:57:48 EST


On Wed, 27 Aug 2003, Andrew Morton wrote:
> Hugh Dickins <hugh@xxxxxxxxxxx> wrote:
> >
> > But I disagree over move_to/from_swap_cache: nothing should
> > be done there at all. Once you have mapping,index in struct
> > futex_q, it's irrelevant what tmpfs might be doing to the
> > page->mapping,page->index of the unmapped page.
>
> But move_to_swap_cache() alters a page's ->mapping and ->index when that
> page is potentially mapped into user pagetables.

It'd better not: BUG_ON(page_mapped(page)) at start of shmem_writepage,
sole caller of move_to_swap_cache. Things fall apart if tmpfs pages
get reassigned to swap while they're mapped.

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/