Re: sparc: Fix mremap VA span checking.

From: Martin Habets
Date: Mon May 12 2008 - 19:19:24 EST


On Mon, May 12, 2008 at 04:24:53AM -0700, David Miller wrote:
> From: Jan Lieskovsky <jlieskov@xxxxxxxxxx>
> Date: Mon, 12 May 2008 13:15:12 +0200
>
> > I have investigated the code for MREMAP_FIXED in
> > sparc_mremap in arch/sparc/kernel/sys_sparc.c, for sys64_mremap
> > in arch/sparc64/kernel/sys_sparc.c and
> > for sys32_mremap in arch/sparc64/kernel/sys_sparc32.c
> > and there are similar conditional range checks ->
> > attaching the patches against 2.6.25.3.
>
> Thanks for the report, I'll take a look at this after getting
> some sleep as it's late hear.
>
> My first impression is that it might make sense to put an
> arch_mmap_check() call at the appropriate spots instead of duplicating
> this check so many times.

sparc32 already has an sparc_mmap_check() in sys_sparc that does this,
and sparc64 has sparc64_mmap_check().
Calling that should do the trick.

--
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/