Re: [PATCH] hold cow while breaking

Linus Torvalds (torvalds@transmeta.com)
Sun, 29 Jul 2001 13:52:23 -0700 (PDT)


On Sun, 29 Jul 2001, Hugh Dickins wrote:
>
> Sorry for being dense, but I still don't get it. I thought the
> down_read on mmap_sem is permitting concurrent faults by other users
> of the address space (but excluding structural changes to the address
> space)? and we haven't locked the page itself, and we've temporarily
> dropped the page_table_lock. I just don't see what lock prevents the
> page from being refaulted in.

Ehh, you're right. But you're still wrong, I think.

Because we hold the mm semaphore, nobody can change the mapping on us.

Which means that even if we first page somthing out and page something
else in to the same page, that "something else" has to be the same thing.
See?

Linus

-
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/