All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Fix offset of mmap
@ 2001-09-14 17:07 H . J . Lu
  2001-09-14 17:10 ` James Simmons
  0 siblings, 1 reply; 4+ messages in thread
From: H . J . Lu @ 2001-09-14 17:07 UTC (permalink / raw)
  To: linux-mips

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);
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-14 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-14 17:07 PATCH: Fix offset of mmap H . J . Lu
2001-09-14 17:10 ` James Simmons
2001-09-14 17:15   ` H . J . Lu
2001-09-14 17:27     ` James Simmons

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.