I've done this two days ago, so Linus has the patch (I append it below
for completeness). I haven't heard back yet.
Regards,
Wolfram.
-- `Surf the sea, not double-u three...' wmglo@dent.med.uni-muenchen.de--- mm/mlock.c.orig Wed Aug 13 11:32:30 1997 +++ mm/mlock.c Mon Oct 13 15:24:10 1997 @@ -124,10 +124,12 @@ pages = -pages; vma->vm_mm->locked_vm += pages; - if (newflags & VM_LOCKED) + if ((newflags & VM_LOCKED) && (newflags & VM_READ)) while (start < end) { - char c = get_user((char *) start); + int c = get_user((int *) start); __asm__ __volatile__("": :"r" (c)); + if (newflags & VM_WRITE) + put_user(c, (int *) start); start += PAGE_SIZE; } }