From: "H . J . Lu" <hjl@lucon.org>
To: linux-mips@oss.sgi.com
Subject: PATCH: Fix offset of mmap
Date: Fri, 14 Sep 2001 10:07:00 -0700 [thread overview]
Message-ID: <20010914100700.A16047@lucon.org> (raw)
We should check if offset of mmap is on the page boundary.
H.J.
---
--- /tmp/tmp.20947.0 Fri Sep 14 10:05:33 2001
+++ arch/mips/kernel/syscall.c Fri Sep 14 10:05:08 2001
@@ -82,6 +82,8 @@ out:
asmlinkage unsigned long old_mmap(unsigned long addr, size_t len, int prot,
int flags, int fd, off_t offset)
{
+ if (offset & ~PAGE_MASK)
+ return -EINVAL;
return do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
}
next reply other threads:[~2001-09-14 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-14 17:07 H . J . Lu [this message]
2001-09-14 17:10 ` PATCH: Fix offset of mmap James Simmons
2001-09-14 17:15 ` H . J . Lu
2001-09-14 17:27 ` James Simmons
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=20010914100700.A16047@lucon.org \
--to=hjl@lucon.org \
--cc=linux-mips@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.