roll in a bunch of bugfixes by Jeroen Iddekinge:
commit6c0871d6b82eecab1b621b680a99ba841a55c684
authorTravis Geiselbrecht <geist@newos.org>
Sat, 8 Dec 2001 16:01:50 +0000 (8 16:01 +0000)
committerTravis Geiselbrecht <geist@newos.org>
Sat, 8 Dec 2001 16:01:50 +0000 (8 16:01 +0000)
treea58de74a4da910cba92f552fe614228d039dad49
parentfe2e23a24ee81cf76861c1fea1829ea5d7d287c4
roll in a bunch of bugfixes by Jeroen Iddekinge:

1) in arch_vm_translation_map.c/vm_translation_map.h/vm.c

The semaphore iospace_full_sem and mutex iospace_mutex are not initialized
correctly, because it is done before the semaphore system is available.
This patch moves the initalization  to a new function, vm_translation_map_module_init_post_sem. This function is called in vm_init_postsem. (The patch only makes the changes for i386, not for the other supported platforms)

2) vfs.c/vfs_mount.c

a) It was possible to mount different devices on the same mount point twice.
   The patch adds a check for this.

b) This is not a bug:
   The vnode of the mountpoint is detemined with sys_Open, get_vnode_from_fd
   and sys_close. This patch replaces this with 'path_to_vnode'

3) thread.c/proc_create_proc2

This is not a bug:
p->proc_creation_sem, is set to '0' after the semaphore is deleted, I
p->think that -1
is maybe  better.

4) elf.c

This patch improves the error handling when a symbol is not resolved in
'elf_resolve_symbol'. When that happened the function returns 0.
But this error was not handled and the return  value was used
as an address. The kernel sometimes panicked with a page fault.

5) elf.c

elf_load_uspace uses the wrong way to detect the entry point into the elf binary

6) vm.c

vm_soft_fault didn't properly handle checking to see if the region changed by improperly recalculating the cache_offset and comparing it with the old version. This would only show up while heavily stressing the system (having it reschedule while inside the page fault handler and having the address space change during that time)

git-svn-id: svn+ssh://newos.org/var/svn/newos/newos@346 c25cc9d1-44fa-0310-b259-ad778cb1d433
include/kernel/arch/vm_translation_map.h
include/sys/errors.h
kernel/arch/i386/arch_vm_translation_map.c
kernel/elf.c
kernel/heap.c
kernel/thread.c
kernel/vfs.c
kernel/vm/vm.c