OK, I'm by no means an expert on this, but Libor and I looked at rmap.c a little more, and there is code: if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) || ptep_clear_flush_young(vma, address, pte)) { ret = SWAP_FAIL; goto out_unmap; } before the check if (PageSwapCache(page) && page_count(page) != page_mapcount(page) + 2) { ret = SWAP_FAIL; goto out_unmap; } If userspace allocates some memory but doesn't touch it aside from passing the address in to the kernel, which does get_user_pages(), the PTE will be young in that first test, right? Does that mean that the userspace mapping will be cleared and userspace will get a different physical page if it faults that address back in? - R. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- References:
- [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Troy Benjegerdes <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Troy Benjegerdes <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Troy Benjegerdes <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Andrew Morton <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: Roland Dreier <[email protected]>
- Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- From: "Michael S. Tsirkin" <[email protected]>
- [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Prev by Date: Re: DVD writer and IDE support...
- Next by Date: Re: Re: [ANNOUNCE] git-pasky-0.3
- Previous by thread: Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Next by thread: Re: [PATCH][RFC][0/4] InfiniBand userspace verbs implementation
- Index(es):