summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-03-24 01:13:19 +0000
committerRoland McGrath <roland@gnu.org>2002-03-24 01:13:19 +0000
commitaf4515d532d10dd62c265daa8b37a4192d8a32c6 (patch)
tree5139b825de11c7b28278e3f336114f8bebfbfb42
parent2c7c5c2a3d8596012d710be74a284b4de3aa792f (diff)
2002-03-23 Roland McGrath <roland@frob.com>
* setup.c (default_pager_paging_storage): Fail if receiver port is not default_pager_default_port.
-rw-r--r--mach-defpager/setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mach-defpager/setup.c b/mach-defpager/setup.c
index 5060dc0a..495a815a 100644
--- a/mach-defpager/setup.c
+++ b/mach-defpager/setup.c
@@ -1,5 +1,5 @@
/* Backing store access callbacks for Hurd version of Mach default pager.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001,02 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -34,6 +34,8 @@ static inline int page_aligned (vm_offset_t num)
/* From serverboot/kalloc.c. */
extern void *kalloc (vm_size_t);
+extern mach_port_t default_pager_default_port; /* default_pager.c */
+
kern_return_t
default_pager_paging_storage (mach_port_t pager,
mach_port_t device,
@@ -48,6 +50,9 @@ default_pager_paging_storage (mach_port_t pager,
error_t err;
recnum_t devsize;
+ if (pager != default_pager_default_port)
+ return KERN_INVALID_ARGUMENT;
+
if (! add)
return remove_paging_file (name); /* XXX ? */