patch-2.4.20 linux-2.4.20/arch/ia64/kernel/sys_ia64.c
Next file: linux-2.4.20/arch/ia64/kernel/time.c
Previous file: linux-2.4.20/arch/ia64/kernel/smpboot.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Thu Nov 28 15:53:09 2002
- Orig file:
linux-2.4.19/arch/ia64/kernel/sys_ia64.c
- Orig date:
Fri Nov 9 14:26:17 2001
diff -urN linux-2.4.19/arch/ia64/kernel/sys_ia64.c linux-2.4.20/arch/ia64/kernel/sys_ia64.c
@@ -2,8 +2,8 @@
* This file contains various system calls that have different calling
* conventions on different platforms.
*
- * Copyright (C) 1999-2000 Hewlett-Packard Co
- * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1999-2000, 2002 Hewlett-Packard Co
+ * David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <linux/config.h>
#include <linux/errno.h>
@@ -201,15 +201,13 @@
if (len == 0)
goto out;
- /* don't permit mappings into unmapped space or the virtual page table of a region: */
+ /*
+ * Don't permit mappings into unmapped space, the virtual page table of a region,
+ * or across a region boundary. Note: RGN_MAP_LIMIT is equal to 2^n-PAGE_SIZE
+ * (for some integer n <= 61) and len > 0.
+ */
roff = rgn_offset(addr);
- if ((len | roff | (roff + len)) >= RGN_MAP_LIMIT) {
- addr = -EINVAL;
- goto out;
- }
-
- /* don't permit mappings that would cross a region boundary: */
- if (rgn_index(addr) != rgn_index(addr + len)) {
+ if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) {
addr = -EINVAL;
goto out;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)