Re: pre12 VM doubts and patch

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Sep 20 2001 - 00:58:43 EST


On Thu, 20 Sep 2001, Andrea Arcangeli wrote:
>
> when the page is exclusive we definitely can write to it

NO!

If it is a read-only mapping, we must NOT mark it writable.

The fact is, the page may have been written to earlier, marked read-only
with mprotect(), and the page is dirty but read-only, and swapping it in
MUST NOT markt it writable even if it is our last exclusive copy.

Which we've gotten wrong for a long time, actually. But you #if 0'ed the
fix that happened fairly recently.

                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/



This archive was generated by hypermail 2b29 : Sun Sep 23 2001 - 21:00:36 EST