Re: pre12 VM doubts and patch

Linus Torvalds (torvalds@transmeta.com)
Wed, 19 Sep 2001 22:58:43 -0700 (PDT)


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/