- enable ipc warnings by default

- ipc checking code in kernel didn't properly catch the
   sendrec() to self case; added special case check
 - triggered by PM using stock panic() - needs its own _exit()

reported by Joren l'Ami.
This commit is contained in:
Ben Gras 2009-04-17 13:46:37 +00:00
parent e5717f7aef
commit e0f3a5acf1
3 changed files with 18 additions and 1 deletions

View file

@ -19,7 +19,7 @@
* Of course the call still fails, but nothing is printed if these warnings
* are disabled.
*/
#define DEBUG_ENABLE_IPC_WARNINGS 0
#define DEBUG_ENABLE_IPC_WARNINGS 1
#define DEBUG_STACKTRACE 1
#define DEBUG_VMASSERT 1
#define DEBUG_SCHED_CHECK 1

View file

@ -201,6 +201,13 @@ long bit_map; /* notification event set or flags */
}
else
{
if(caller_ptr->p_endpoint == src_dst_e) {
#if DEBUG_ENABLE_IPC_WARNINGS
kprintf("sys_call: trap %d by %d with self %d\n",
call_nr, proc_nr(caller_ptr), src_dst_e);
#endif
return EINVAL;
}
/* Require a valid source and/or destination process. */
if(!isokendpt(src_dst_e, &src_dst_p)) {
#if DEBUG_ENABLE_IPC_WARNINGS

View file

@ -417,3 +417,13 @@ register struct mproc *rmp; /* tells which process is exiting */
rmp->mp_child_stime = 0;
procs_in_use--;
}
PUBLIC void _exit(int code)
{
sys_exit(SELF);
}
PUBLIC void __exit(int code)
{
sys_exit(SELF);
}