Re: [PATCH] sys_mmap doesn't follow posix.1 when parameter len=0

From: David Mosberger <>
Date: 2005-05-26 08:55:36
>>>>> On Mon, 23 May 2005 08:47:06 +0800, "Zhang, Yanmin" <> said:

  Yanmin> In IA64 kernel, sys_mmap calls do_mmap2 and do_mmap2 returns
  Yanmin> addr if len=0, which means the mmap sys call succeeds.

  Yanmin> Posix.1 says: The mmap() function shall fail if: [EINVAL]
  Yanmin> The value of len is zero.

  Yanmin> Here is a patch to fix it.

  Yanmin> Signed-off-by: Zhang Yanmin <>

Looks like Gordon Jin changed mm/mmap.c to be POSIX compliant back in
March 2005 but didn't update the ia64 code.  Looks fine to me.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed May 25 18:55:54 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:39 EST