]> Zhao Yanbai Git Server - minix.git/commitdiff
KERNEL - cause SIGSEGV if bad pointer to kernel
authorTomas Hruby <thruby@few.vu.nl>
Mon, 5 Dec 2011 01:08:48 +0000 (01:08 +0000)
committerTomas Hruby <tom@minix3.org>
Fri, 13 Jan 2012 11:30:00 +0000 (11:30 +0000)
kernel/system.c

index 9007b4ce4f86bdb1ab2c8502f7e57b8cf49f576d..317aeb6879c95f040d6c4b060103c595bafc1a66 100644 (file)
@@ -90,6 +90,7 @@ PRIVATE void kernel_call_finish(struct proc * caller, message *msg, int result)
                                          caller->p_delivermsg_vir,
                                          caller->p_name,
                                          caller->p_endpoint);
+                         cause_sig(proc_nr(caller), SIGSEGV);
                  }
          }
   }
@@ -154,7 +155,8 @@ PUBLIC void kernel_call(message *m_user, struct proc * caller)
   else {
          printf("WARNING wrong user pointer 0x%08x from process %s / %d\n",
                          m_user, caller->p_name, caller->p_endpoint);
-         result = EBADREQUEST;
+         cause_sig(proc_nr(caller), SIGSEGV);
+         return;
   }