- 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.
* 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
}
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
rmp->mp_child_stime = 0;
procs_in_use--;
}
+
+PUBLIC void _exit(int code)
+{
+ sys_exit(SELF);
+}
+
+PUBLIC void __exit(int code)
+{
+ sys_exit(SELF);
+}