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/