lkml.org 
[lkml]   [2005]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 2.6.13-rc4] fix get_user_pages bug
On Wed, Aug 03, 2005 at 09:12:37AM -0700 Linus Torvalds wrote:

>
>
> On Wed, 3 Aug 2005, Nick Piggin wrote:
> >
> > Oh, it gets rid of the -1 for VM_FAULT_OOM. Doesn't seem like there
> > is a good reason for it, but might that break out of tree drivers?
>
> Ok, I applied this because it was reasonably pretty and I liked the
> approach. It seems buggy, though, since it was using "switch ()" to test
> the bits (wrongly, afaik), and I'm going to apply the appended on top of
> it. Holler quickly if you disagreee..
>

x86_64 had hardcoded the VM_ numbers so it broke down when the numbers
were changed.

Signed-off-by: Alexander Nyberg <alexn@telia.com>

Index: linux-2.6/arch/x86_64/mm/fault.c
===================================================================
--- linux-2.6.orig/arch/x86_64/mm/fault.c 2005-07-31 18:10:20.000000000 +0200
+++ linux-2.6/arch/x86_64/mm/fault.c 2005-08-04 16:04:59.000000000 +0200
@@ -439,13 +439,13 @@
* the fault.
*/
switch (handle_mm_fault(mm, vma, address, write)) {
- case 1:
+ case VM_FAULT_MINOR:
tsk->min_flt++;
break;
- case 2:
+ case VM_FAULT_MAJOR:
tsk->maj_flt++;
break;
- case 0:
+ case VM_FAULT_SIGBUS:
goto do_sigbus;
default:
goto out_of_memory;
-
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/
\
 
 \ /
  Last update: 2005-08-04 16:20    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site