Re: SH7709S linux-2.6.3 SIGV

Kaz Kojima <[email protected]> Wed, 25 Feb 2004 09:03:10 +0900 (JST)
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general
Message-ID <[email protected]>
Hi,

Yutaro Ebihara <[email protected]> wrote:
> On my SH7709S board, userland process couldn't run.
> in mm/mmap.c:arch_get_unmapped_area()  function,
[snip]
> --- 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) {
> 

How about defining HAVE_ARCH_UNMAPPED_AREA for sh3 and writing
a sh3 specific arch_get_unmapped_area like as sh4?
You could define HAVE_ARCH_UNMAPPED_AREA in include/asm-sh/
cpu-sh3/cacheflush.h and push a new arch_get_unmapped_area into
arch/sh/kernel/syscall.c with #if machinery.

Anyway, thanks for the patch and report!  We have few reports
about 2.6.x kernel in lists and I'm afraid that it works only
on a few targets.

Regards,
	kaz


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click