|
[linux-sh:03173] SH7709S linux-2.6.3 SIGV: msg#00008linux.ports.sh.general
Hello all. On my SH7709S board, userland process couldn't run. in mm/mmap.c:arch_get_unmapped_area() function, static inline unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) :snip if (addr) { addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); if (TASK_SIZE - len >= addr && (!vma || addr + len <= vma->vm_start)) return addr; } start_addr = addr = mm->free_area_cache; if addr=0 then addr will be 0x29555555. and returns 0x29555555 /* Obtain the address to map to. we verify (or select) it and ensure * that it represents a valid section of the address space. */ addr = get_unmapped_area(file, addr, len, pgoff, flags); if (addr & ~PAGE_MASK) return addr; <------------ returns 0x29555555 in this case, struct_vma (includes 0x29555555) will not creat. SIGV happens as a result. I make this patch and my SH7709S board runs well. --- linux-2.6.3/mm/mmap.c Wed Feb 18 12:58:32 2004 +++ linux-2.6.3-sh/mm/mmap.c Tue Feb 24 15:11:02 2004 @@ -737,21 +738,21 @@ if (len > TASK_SIZE) return -ENOMEM; if (addr) { addr = PAGE_ALIGN(addr); vma = find_vma(mm, addr); if (TASK_SIZE - len >= addr && (!vma || addr + len <= vma->vm_start)) return addr; } - start_addr = addr = mm->free_area_cache; + start_addr = addr = PAGE_ALIGN(mm->free_area_cache); full_search: for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { /* At this point: (!vma || addr < vma->vm_end). */ if (TASK_SIZE - len < addr) { |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [linux-sh:03172] Re: HP 620LX (SH-7709) Problems: 00008, Ben Jackson |
|---|---|
| Next by Date: | Re: SH7709S linux-2.6.3 SIGV: 00008, Kaz Kojima |
| Previous by Thread: | [linux-sh:03169] Re: mozilla on sh4i: 00008, Stuart MENEFY |
| Next by Thread: | Re: SH7709S linux-2.6.3 SIGV: 00008, Kaz Kojima |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |