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