Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: mlockall() still causes 100 % oops in 2.0.27
Date: Wed, 4 Dec 1996 01:06:18 -0600 (CST)	[thread overview]
Message-ID: <199612040706.BAA22292@atheist.tamu.edu> (raw)
In-Reply-To: <199612032117.WAA00396@alpha.franken.de>

> Unable to handle kernel paging request at virtual address 0000015555720000
> [...]
> 0000015555720000-0000015555772000 ---p 00000000000ae000 08:01 19433
> [...]
> Hope this helps someone.

Indeed it does.  The appended is not what I would have called the ideal
fix, as it doesn't do the right thing for vmas that are, e.g., exec only,
but it does keep the kernel from crashing.

It would be cleaner imho, though slower, to make a call into some other 
part of the mm directly that would assert that a given page is present.

r~

--- mlock.c.orig        Wed Dec  4 00:55:53 1996
+++ mlock.c     Wed Dec  4 01:05:37 1996
@@ -124,10 +124,10 @@ static int mlock_fixup(struct vm_area_st
                        pages = -pages;
                vma->vm_mm->locked_vm += pages;
 
-               if (newflags & VM_LOCKED)
+               if ((newflags & (VM_LOCKED|VM_READ)) == (VM_LOCKED|VM_READ))
                        while (start < end) {
-                               char c;
-                               get_user(c,(char *) start);
+                               int c;
+                               get_user(c,(int *) start);
                                __asm__ __volatile__("": :"r" (c));
                                start += PAGE_SIZE;
                        }

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

  reply	other threads:[~1996-12-04  7:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ionut@moisil.wal.rhno.columbia.edu>
1996-12-03 12:51 ` mlockall() still causes 100 % oops in 2.0.27 Zarmfab Software Development
1996-12-03 21:17   ` Thomas Bogendoerfer
1996-12-04  7:06     ` Richard Henderson [this message]
     [not found] <199612012241.XAA21773@fabsoft2.zarm.uni-bremen.de>
1996-12-01 23:57 ` Ion Badulescu
1996-12-01 22:41 Zarmfab Software Development
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox