From: Hong Liu <hong.liu@intel.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6] fix mmap() return value to conform to POSIX
Date: Mon, 21 Mar 2005 18:26:39 +0800 [thread overview]
Message-ID: <1111400799.3548.7.camel@devlinux-hong> (raw)
POSIX said:
mmap() should return [EOVERFLOW] if the file is a regular file and the
value of off + len exceeds the offset maximum established in the open
file description associated with fildes.
--- a/mm/mmap.c.orig 2005-03-16 14:08:59.116052416 +0800
+++ b/mm/mmap.c 2005-03-16 14:10:16.167338840 +0800
@@ -906,7 +906,7 @@ unsigned long do_mmap_pgoff(struct file
/* offset overflow? */
if ((pgoff + (len >> PAGE_SHIFT)) < pgoff)
- return -EINVAL;
+ return -EOVERFLOW;
/* Too many mappings? */
if (mm->map_count > sysctl_max_map_count)
reply other threads:[~2005-03-21 10:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1111400799.3548.7.camel@devlinux-hong \
--to=hong.liu@intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox