lkml.org 
[lkml]   [2004]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix for vmalloc problem was Re: 2.6.10-rc1-mm3
On Fri, Nov 05, 2004 at 11:16:24PM +1100, Con Kolivas wrote:
> Andi Kleen wrote:
> >Con Kolivas <kernel@kolivas.org> writes:
> >
> >
> >>It's life Jim but not as we know it...
> >>
> >>
> >>This happened during modprobe of alsa modules. Keyboard still alive,
> >>everything else dead; not even sysrq would do anything, netconsole had
> >>no output, luckily this made it to syslog:
> >
> >
> >I just tested modprobing of alsa (snd_intel8x0) and it works for me.
> >Also vmalloc must work at least to some point.
> >
> >Can you confirm it's really caused by 4level by reverting all the
> >4level-* patches from broken out?
>
> I dont recall blaming 4level. When I get a chance I'll try.

This patch should fix it. Can you please test? Thanks.

-Andi

Fix silly typo in mm/vmalloc.c and some minor cleanups.

Signed-off-by: Andi Kleen <ak@suse.de>


diff -up linux-2.6.10rc1-mm3/mm/vmalloc.c-o linux-2.6.10rc1-mm3/mm/vmalloc.c
--- linux-2.6.10rc1-mm3/mm/vmalloc.c-o 2004-11-05 11:42:00.000000000 +0100
+++ linux-2.6.10rc1-mm3/mm/vmalloc.c 2004-11-05 14:10:04.000000000 +0100
@@ -98,7 +98,6 @@ static void unmap_area_pgd(pml4_t *pml4,
}

pgd = pml4_pgd_offset_k(pml4, address);
- address &= ~PML4_MASK;
end = address + size;

do {
@@ -114,8 +113,8 @@ static int map_area_pte(pte_t *pte, unsi
{
unsigned long end;

- address &= ~PMD_MASK;
end = address + size;
+ address &= ~PMD_MASK;
if (end > PMD_SIZE)
end = PMD_SIZE;

@@ -187,7 +186,7 @@ void unmap_vm_area(struct vm_struct *are
flush_cache_vunmap(address, end);
for (i = pml4_index(address); i <= pml4_index(end-1); i++) {
next = (address + PML4_SIZE) & PML4_MASK;
- if (next <= address || next > end)
+ if (next < address || next > end)
next = end;
unmap_area_pgd(pml4, address, next - address);
address = next;
@@ -213,7 +212,7 @@ int map_vm_area(struct vm_struct *area,
err = -ENOMEM;
break;
}
- next = (address + PGDIR_SIZE) & PGDIR_MASK;
+ next = (address + PML4_SIZE) & PML4_MASK;
if (next < address || next > end)
next = end;
if (map_area_pgd(pgd, address, next, prot, pages)) {
-
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-03-22 14:07    [W:0.054 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site