diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-10-02 14:54:27 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-10-02 14:54:27 +0000 |
commit | 51038fcecccdb2ef38a03bd8672d9f4024d22d23 (patch) | |
tree | d596266e8644962328f9a0b0f8762aea6b978f48 /init | |
parent | d806d1ed685ac326363801456c74d5c40cfb5db8 (diff) |
1999-09-28 Thomas Bushnell, BSG <tb@mit.edu>
* init.c (frob_kernel_process): Allocate the kernel's page in the
actual kernel task, not in our own. I wonder how this ever
worked. Also if we fail in that allocation, free the page we
allocated in our own space.
Diffstat (limited to 'init')
-rw-r--r-- | init/ChangeLog | 7 | ||||
-rw-r--r-- | init/init.c | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/init/ChangeLog b/init/ChangeLog index 6c20462c..941c6903 100644 --- a/init/ChangeLog +++ b/init/ChangeLog @@ -1,3 +1,10 @@ +1999-09-28 Thomas Bushnell, BSG <tb@mit.edu> + + * init.c (frob_kernel_process): Allocate the kernel's page in the + actual kernel task, not in our own. I wonder how this ever + worked. Also if we fail in that allocation, free the page we + allocated in our own space. + 1999-08-24 Roland McGrath <roland@baalperazim.frob.com> * init.c (notify_shutdown): Add const to argument type. diff --git a/init/init.c b/init/init.c index 1acf2b9c..3ec1270b 100644 --- a/init/init.c +++ b/init/init.c @@ -1010,15 +1010,14 @@ frob_kernel_process (void) mine = (vm_address_t) mmap (0, windowsz, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); assert (mine != -1); - his = (vm_address_t) mmap (0, windowsz, PROT_READ|PROT_WRITE, - MAP_ANON, 0, 0); - assert (his != -1); + err = vm_allocate (task, &his, windowsz, 1); if (err) { error (0, err, "cannot allocate %Zu bytes in kernel task", windowsz); free (argz); mach_port_deallocate (mach_task_self (), proc); mach_port_deallocate (mach_task_self (), task); + munmap ((caddr_t) mine, windowsz); return; } |